Files
famapp/src/components/dashboard-greeting.tsx
T
ginnoir a09747c314
CI / checks (push) Failing after 2m7s
CI / build (push) Successful in 4m36s
feat: journal dashboard widgets, agent polish, and edit-mode live previews
Journal dashboard widgets and quick-add; rich-text quick-add dialogs.

Dashboard draft sync for live edit previews; assistant bubble + API tools.

Journal UX: stress slider, mood grid, query cap fix.
2026-07-04 22:03:45 -05:00

25 lines
697 B
TypeScript

const greetingForHour = (h: number) =>
h < 5 ? "Up early" : h < 12 ? "Good morning" : h < 18 ? "Good afternoon" : "Good evening";
export function DashboardGreeting({ firstName }: { firstName: string }) {
const now = new Date();
const greeting = greetingForHour(now.getHours());
const today = now.toLocaleDateString(undefined, {
weekday: "long",
month: "long",
day: "numeric",
});
return (
<div>
<h1 className="serif text-[26px] sm:text-[30px] leading-tight tracking-tight">
{greeting}
{firstName && `, ${firstName}`}.
</h1>
<p className="muted mt-1 text-[13px]" suppressHydrationWarning>
{today}
</p>
</div>
);
}