moved tip to records page for month reference
This commit is contained in:
@@ -1300,9 +1300,6 @@ function RecentTransactionsPanel({
|
|||||||
<div className="space-y-3">
|
<div className="space-y-3">
|
||||||
<h2 className="font-semibold">{title}</h2>
|
<h2 className="font-semibold">{title}</h2>
|
||||||
{rangeLabel ? <div className="text-xs muted">{rangeLabel}</div> : null}
|
{rangeLabel ? <div className="text-xs muted">{rangeLabel}</div> : null}
|
||||||
<div className="text-xs muted">
|
|
||||||
Tip: Records defaults to This month ({currentMonthLabel}).
|
|
||||||
</div>
|
|
||||||
<EmptyState
|
<EmptyState
|
||||||
message="No transactions yet"
|
message="No transactions yet"
|
||||||
actionLabel="Record one"
|
actionLabel="Record one"
|
||||||
@@ -1315,9 +1312,6 @@ function RecentTransactionsPanel({
|
|||||||
<div className="space-y-3">
|
<div className="space-y-3">
|
||||||
<h2 className="font-semibold">{title}</h2>
|
<h2 className="font-semibold">{title}</h2>
|
||||||
{rangeLabel ? <div className="text-xs muted">{rangeLabel}</div> : null}
|
{rangeLabel ? <div className="text-xs muted">{rangeLabel}</div> : null}
|
||||||
<div className="text-xs muted">
|
|
||||||
Tip: Records defaults to This month ({currentMonthLabel}).
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Desktop table view */}
|
{/* Desktop table view */}
|
||||||
<div className="hidden sm:block border rounded-xl overflow-x-auto">
|
<div className="hidden sm:block border rounded-xl overflow-x-auto">
|
||||||
|
|||||||
@@ -64,12 +64,24 @@ 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