Fixed type issues
This commit is contained in:
parent
ed526338dd
commit
c9f36aeb1e
@ -26,14 +26,16 @@ import {
|
|||||||
} from '@/shared/shadcn-ui/table';
|
} from '@/shared/shadcn-ui/table';
|
||||||
|
|
||||||
export const TransactionsTable = () => {
|
export const TransactionsTable = () => {
|
||||||
const [startDate, setStartDate] = useState<Date>(subMonths(new Date(), 1));
|
const [startDate, setStartDate] = useState<Date | undefined>(
|
||||||
const [endDate, setEndDate] = useState<Date>(new Date());
|
subMonths(new Date(), 1),
|
||||||
|
);
|
||||||
|
const [endDate, setEndDate] = useState<Date | undefined>(new Date());
|
||||||
|
|
||||||
const { data, refetch } = useFetchBonusTransactionsQuery({
|
const { data, refetch } = useFetchBonusTransactionsQuery({
|
||||||
limit: 100,
|
limit: 100,
|
||||||
page: 1,
|
page: 1,
|
||||||
start_date: format(startDate, 'yyyy-MM-dd'),
|
...(startDate ? { start_date: format(startDate, 'yyyy-MM-dd') } : {}),
|
||||||
end_date: format(endDate, 'yyyy-MM-dd'),
|
...(endDate ? { end_date: format(endDate, 'yyyy-MM-dd') } : {}),
|
||||||
});
|
});
|
||||||
|
|
||||||
// Filter transactions by date range
|
// Filter transactions by date range
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user