@@ -5,6 +5,8 @@ import { getServerSession } from "../api/auth/[...nextauth]/auth";
|
||||
import { EmailVerification } from "_components/EmailVerification";
|
||||
import { FirstPath } from "./_components/FirstPath";
|
||||
import { Penalty } from "_components/Penalty";
|
||||
import { getLatestChangelog } from "(app)/_components/ChangelogActions";
|
||||
import { OpenChangelogOnPageload } from "(app)/_components/Changelog";
|
||||
|
||||
import { Footer } from "(app)/_components/Footer";
|
||||
|
||||
@@ -22,6 +24,8 @@ export default async function RootLayout({
|
||||
|
||||
if (!session) redirect(`/login`);
|
||||
|
||||
const latestChangelog = !session.user.changelogAck ? await getLatestChangelog() : null;
|
||||
|
||||
return (
|
||||
<div
|
||||
className="hero min-h-screen"
|
||||
@@ -31,8 +35,8 @@ export default async function RootLayout({
|
||||
>
|
||||
<div className="hero-overlay bg-opacity-30"></div>
|
||||
{/* Card */}
|
||||
<div className="hero-content text-neutral-content text-center w-full max-w-full h-full m-10">
|
||||
<div className="card bg-base-100 shadow-2xl w-full min-h-full h-full max-h-[calc(100vh-13rem)] p-4 flex flex-col mr-24 ml-24">
|
||||
<div className="hero-content text-neutral-content m-10 h-full w-full max-w-full text-center">
|
||||
<div className="card bg-base-100 ml-24 mr-24 flex h-full max-h-[calc(100vh-13rem)] min-h-full w-full flex-col p-4 shadow-2xl">
|
||||
{/* Top Navbar */}
|
||||
<HorizontalNav />
|
||||
|
||||
@@ -42,7 +46,7 @@ export default async function RootLayout({
|
||||
<VerticalNav />
|
||||
|
||||
{/* Scrollbarer Content-Bereich */}
|
||||
<div className="flex-grow bg-base-100 px-6 rounded-lg shadow-md ml-4 overflow-auto h-full max-w-full w-full">
|
||||
<div className="bg-base-100 ml-4 h-full w-full max-w-full flex-grow overflow-auto rounded-lg px-6 shadow-md">
|
||||
<Penalty />
|
||||
{!session?.user.emailVerified && (
|
||||
<div className="mb-4">
|
||||
@@ -50,6 +54,9 @@ export default async function RootLayout({
|
||||
</div>
|
||||
)}
|
||||
{!session.user.pathSelected && <FirstPath />}
|
||||
{session.user.pathSelected && latestChangelog && (
|
||||
<OpenChangelogOnPageload latestChangelog={latestChangelog} />
|
||||
)}
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user