Skip to content

Commit

Permalink
fix preview exit
Browse files Browse the repository at this point in the history
  • Loading branch information
RedBeardEth committed Oct 8, 2024
1 parent a8f994a commit e8923f4
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions apps/nextjs/src/app/(app)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,16 @@ export default function Layout(props: { children: React.ReactNode }) {
<TopNav />
<div className="flex-grow pt-[var(--site-header-height)] sm:mb-24 sm:pl-[var(--site-sidemenu-width)]">
{props.children}
{isEnabled && (
<Alert variant={"warning"} className="mx-4 w-full">
Draft mode ({cookies().get("ks-branch")?.value}){" "}
<form method="POST" action="/preview/end">
<Button className="mt-4">End preview</Button>
</form>
</Alert>
)}
{isEnabled.toString()}
</div>
{isEnabled && (
<Alert className="w-full">
Draft mode ({cookies().get("ks-branch")?.value}){" "}
<form method="POST" action="/preview/end">
<Button>End preview</Button>
</form>
</Alert>
)}
{isEnabled.toString()}
<Footer />
</div>
</main>
Expand Down

0 comments on commit e8923f4

Please sign in to comment.