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