changed records page UI to be better (shows first 10 by default
All checks were successful
Deploy / deploy (push) Successful in 57s
Security Tests / security-non-db (push) Successful in 24s
Security Tests / security-db (push) Successful in 31s

This commit is contained in:
2026-04-02 22:29:09 -05:00
parent 46eb54f341
commit 1ffb909c57

View File

@@ -13,7 +13,7 @@ export default function TransactionsPage() {
const [search, setSearch] = useState("");
const [typeFilter, setTypeFilter] = useState<"all" | "variable" | "fixed">("all");
const [catFilter, setCatFilter] = useState<string>("all");
const [dateFilter, setDateFilter] = useState<"month" | "30" | "all">("month");
const [dateFilter, setDateFilter] = useState<"month" | "30" | "all">("all");
const [page, setPage] = useState(1);
const limit = 10;
@@ -64,24 +64,12 @@ export default function TransactionsPage() {
return [...categoryOptions, ...planOptions];
}, [dashboard?.variableCategories, dashboard?.fixedPlans]);
const currentMonthLabel = useMemo(
() =>
new Intl.DateTimeFormat("en-US", {
month: "long",
year: "numeric",
}).format(new Date()),
[]
);
return (
<div className="fade-in space-y-8">
<header className="row">
<h1 className="text-xl font-bold">Records</h1>
<div className="text-xs muted mt-1">
Tip: Records defaults to This month ({currentMonthLabel}).
</div>
</header>
<div className="topnav p-3 rounded-xl sticky top-14 z-10" style={{ backdropFilter: "blur(8px)" }}>