mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
chore(FE-327): Remove unused state from SalesReportTable
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import React, { useState, useMemo } from 'react';
|
||||
import React, { useMemo } from 'react';
|
||||
import { ColumnDef } from '@tanstack/react-table';
|
||||
import Table, { CustomHeaderRow } from '@/components/Table';
|
||||
import Card from '@/components/Card';
|
||||
@@ -115,14 +115,9 @@ const SalesReportTable = ({
|
||||
type = 'detail',
|
||||
initialValues,
|
||||
}: SalesReportTableProps) => {
|
||||
const [activeTabId, setActiveTabId] = useState<string>('penjualan');
|
||||
|
||||
const salesBroilerData: BaseSales[] = useMemo(() => {
|
||||
if (activeTabId === 'penjualan' && initialValues && initialValues.sales) {
|
||||
return initialValues.sales;
|
||||
}
|
||||
return [];
|
||||
}, [initialValues, activeTabId]);
|
||||
return initialValues?.sales || [];
|
||||
}, [initialValues]);
|
||||
|
||||
const totals = useMemo(() => {
|
||||
if (salesBroilerData.length === 0) {
|
||||
|
||||
Reference in New Issue
Block a user