feat: implement clickable category links in charts and lists; handle uncategorized transactions in URL parameters
This commit is contained in:
@@ -69,6 +69,21 @@ export function useTransactionsPage() {
|
||||
}
|
||||
}, [searchParams]);
|
||||
|
||||
// Handle categoryIds and includeUncategorized from URL params
|
||||
useEffect(() => {
|
||||
const categoryIdsParam = searchParams.get("categoryIds");
|
||||
const includeUncategorizedParam = searchParams.get("includeUncategorized");
|
||||
|
||||
if (categoryIdsParam) {
|
||||
const categoryIds = categoryIdsParam.split(",");
|
||||
setSelectedCategories(categoryIds);
|
||||
setPage(0);
|
||||
} else if (includeUncategorizedParam === "true") {
|
||||
setSelectedCategories(["uncategorized"]);
|
||||
setPage(0);
|
||||
}
|
||||
}, [searchParams]);
|
||||
|
||||
// Calculate start date based on period
|
||||
const startDate = useMemo(() => {
|
||||
const now = new Date();
|
||||
|
||||
Reference in New Issue
Block a user