ballerine
ballerine copied to clipboard
Implement Date Range Filtering with Zod and useZodSearchParams
Task Definition What? Add a search query params schema for from and to dates to be used with useZodSearchParams.
Why? To enable date range filtering on the Statistics page, allowing users to customize the data displayed within specified time frames.
How?
Define a Zod schema that validates from
and to
date parameters.
Integrate this schema with useZodSearchParams to parse and validate query parameters from the URL.
Acceptance Criteria:
Date range query parameters are correctly parsed and validated. The Statistics page data updates based on the selected date range. There are no errors in the devtools or terminal and no infinite redirects due to invalid search query params