changed records page UI to be better (shows first 10 by default
This commit is contained in:
@@ -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)" }}>
|
||||
|
||||
Reference in New Issue
Block a user