add titles to homepage
All checks were successful
CI / Maven unit tests (push) Successful in 13s
CI / Build and push images (push) Has been skipped
CI / Deploy to server (push) Has been skipped

This commit is contained in:
2026-07-29 21:23:34 +01:00
parent 6ddffd8e2b
commit 9dcab44465
4 changed files with 50 additions and 6 deletions

View File

@@ -1,15 +1,35 @@
import {useAuth} from "../utils/AuthContext.tsx";
import NoAccessPage from "../components/NoAccessPage.tsx";
import {Link} from "react-router-dom";
const Home = () => {
const { user } = useAuth();
const now = new Date();
const formatted: string = new Intl.DateTimeFormat('en-IE', {
weekday: 'short',
weekday: 'long',
day: 'numeric',
month: 'short',
month: 'long',
}).format(now);
if (user == null) {
return (<NoAccessPage />)
}
return (
<div className="flex flex-col items-center px-8 py-12 min-h-full">
<p className={"font-data text-faint-mono"}>{formatted}</p>
<div>
<div className={"p-10 flex flex-row justify-between"}>
<div>
<p className={"font-data text-faint-mono text-sm tracking-widest"}>{formatted.toLocaleUpperCase()}</p>
<h1 className={"font-heading font text-5xl text-text-strong tracking-[-0.015em]"}>Good evening, {user.name.split(" ", 1)}</h1>
</div>
<Link to={"/stream"}>
<button className={"bg-accent rounded-md text-hover text-sm p-1 pl-2 pr-2 hover:bg-accent-hover shadow-md"}>
Open Stream Panel
</button>
</Link>
</div>
</div>
);
};