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