Nav Bar correct and iframe2

This commit is contained in:
Alma 2025-04-08 18:31:38 +02:00
parent 9822ae1a92
commit c1a6656b59

View File

@ -1,10 +1,8 @@
"use client"; "use client";
import { MainNav } from "@/components/main-nav"; import { MainNav } from "@/components/main-nav";
import { Footer } from "@/components/footer";
import { AuthCheck } from "@/components/auth/auth-check"; import { AuthCheck } from "@/components/auth/auth-check";
import { Toaster } from "@/components/ui/toaster"; import { Toaster } from "@/components/ui/toaster";
import { useBackgroundImage } from "@/components/background-switcher";
interface LayoutWrapperProps { interface LayoutWrapperProps {
children: React.ReactNode; children: React.ReactNode;
@ -17,8 +15,6 @@ export function LayoutWrapper({
isSignInPage, isSignInPage,
isAuthenticated, isAuthenticated,
}: LayoutWrapperProps) { }: LayoutWrapperProps) {
const { currentBackground, changeBackground } = useBackgroundImage();
if (isSignInPage) { if (isSignInPage) {
return <>{children}</>; return <>{children}</>;
} }
@ -26,29 +22,13 @@ export function LayoutWrapper({
return ( return (
<AuthCheck> <AuthCheck>
<div className="min-h-screen bg-black"> <div className="min-h-screen bg-black">
<nav className="h-20 bg-black/20 px-4"> <nav className="h-16 bg-black/20 px-4">
{!isSignInPage && isAuthenticated && <MainNav />} {!isSignInPage && isAuthenticated && <MainNav />}
</nav> </nav>
<main className="h-[calc(100vh-5rem)]"> <main className="h-[calc(100vh-4rem)]">
<div
style={
{
backgroundImage: `url('${currentBackground}')`,
backgroundSize: 'cover',
backgroundPosition: 'center',
backgroundRepeat: 'no-repeat',
backgroundAttachment: 'fixed',
cursor: 'pointer',
transition: 'background-image 0.5s ease-in-out'
}
}
onClick={!isSignInPage ? changeBackground : undefined}
>
{children} {children}
</div>
</main> </main>
</div> </div>
{!isSignInPage && isAuthenticated && <Footer />}
<Toaster /> <Toaster />
</AuthCheck> </AuthCheck>
); );