Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,23 @@ const OverviewHomeHeader = ({
return name.split(" ")[0] || "builder";
}, [user]);

const greeting = useMemo(() => {
const hour = new Date().getHours();

if (hour >= 5 && hour < 12) return "Good morning";
if (hour >= 12 && hour < 17) return "Good afternoon";

return "Good evening";
}, []);

return (
<header className="border-border bg-card rounded-2xl border p-5 shadow-sm sm:p-6">
<div className="flex flex-col gap-5 lg:flex-row lg:items-end lg:justify-between">
<div>
<p className="text-accent text-xs font-bold tracking-[0.2em] uppercase">Overview</p>

<h1 className="mt-3 text-3xl font-black tracking-tight sm:text-4xl">
Good morning, {firstName}.
{greeting}, {firstName}.
</h1>

<p className="text-muted mt-2 max-w-2xl text-base">
Expand Down
Loading