Improved Changelog, Changelog in Dispatch
This commit is contained in:
@@ -5,8 +5,6 @@ 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";
|
||||
|
||||
@@ -24,8 +22,6 @@ export default async function RootLayout({
|
||||
|
||||
if (!session) redirect(`/login`);
|
||||
|
||||
const latestChangelog = !session.user.changelogAck ? await getLatestChangelog() : null;
|
||||
|
||||
return (
|
||||
<div
|
||||
className="hero min-h-screen"
|
||||
@@ -54,9 +50,7 @@ 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