add titles to homepage
This commit is contained in:
@@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user