chore(FE-Cleanup): Clean up unused code and add memoization

This commit is contained in:
rstubryan
2026-01-23 18:12:44 +07:00
parent cdef3e797e
commit e386d2a389
12 changed files with 19 additions and 71 deletions
@@ -13,7 +13,6 @@ interface HppExpeditionReportTableProps {
}
const HppExpeditionReportTable = ({
type = 'detail',
initialValues,
}: HppExpeditionReportTableProps) => {
const costOfRevenueExpeditionData: BaseExpeditionCost[] = useMemo(() => {
@@ -4,7 +4,6 @@ import React, { useMemo } from 'react';
import { ColumnDef } from '@tanstack/react-table';
import Table from '@/components/Table';
import Card from '@/components/Card';
import Badge from '@/components/Badge';
import { formatCurrency, formatNumber, formatDate } from '@/lib/helper';
import {
BaseClosingSales,
@@ -20,10 +19,7 @@ interface SalesReportTableProps {
initialValues?: BaseClosingSales;
}
const SalesReportTable = ({
type = 'detail',
initialValues,
}: SalesReportTableProps) => {
const SalesReportTable = ({ initialValues }: SalesReportTableProps) => {
const salesData: BaseSales[] = useMemo(() => {
return initialValues?.sales || [];
}, [initialValues]);