Skip to content

Commit

Permalink
wire chart page to dayRange
Browse files Browse the repository at this point in the history
  • Loading branch information
Hbbb committed Feb 21, 2024
1 parent 576d40a commit 4433d45
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/components/pages/ChartPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,20 @@ export function ChartPage() {
DEFAULT_BUDGET,
)

const minDate = useMemo(
() => format(sub(new Date(), { days: dayRange }), 'yyyy-MM-dd'),
[dayRange],
)

const { data, refetch } = trpc.transactions.useQuery(
{
pageIndex: 0,
pageSize: Infinity,
minDate,
showHidden: false,
rowSelection: {},
sorting: [],
selection: [],
columnFilters: [],
columnFilters: [
{
id: 'dayRange',
value: dayRange,
},
],
columnVisibility: {},
},
{
Expand Down

0 comments on commit 4433d45

Please sign in to comment.