agenda finition
This commit is contained in:
parent
5f341b3829
commit
4dd5ef3ac1
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import { useSession, signOut } from "next-auth/react";
|
import { useSession, signOut } from "next-auth/react";
|
||||||
|
import { usePathname } from "next/navigation";
|
||||||
import { MainNav } from "@/components/main-nav";
|
import { MainNav } from "@/components/main-nav";
|
||||||
import { Footer } from "@/components/footer";
|
import { Footer } from "@/components/footer";
|
||||||
import { AuthCheck } from "@/components/auth/auth-check";
|
import { AuthCheck } from "@/components/auth/auth-check";
|
||||||
@ -26,6 +27,8 @@ interface LayoutWrapperProps {
|
|||||||
export function LayoutWrapper({ children, isSignInPage, isAuthenticated }: LayoutWrapperProps) {
|
export function LayoutWrapper({ children, isSignInPage, isAuthenticated }: LayoutWrapperProps) {
|
||||||
const { currentBackground, changeBackground } = useBackgroundImage();
|
const { currentBackground, changeBackground } = useBackgroundImage();
|
||||||
const { data: session } = useSession();
|
const { data: session } = useSession();
|
||||||
|
const pathname = usePathname();
|
||||||
|
const isAgendaPage = pathname === '/agenda';
|
||||||
|
|
||||||
// Listen for incoming RocketChat calls via WebSocket
|
// Listen for incoming RocketChat calls via WebSocket
|
||||||
const { incomingCall, setIncomingCall } = useRocketChatCalls();
|
const { incomingCall, setIncomingCall } = useRocketChatCalls();
|
||||||
@ -230,7 +233,8 @@ export function LayoutWrapper({ children, isSignInPage, isAuthenticated }: Layou
|
|||||||
>
|
>
|
||||||
<main>{children}</main>
|
<main>{children}</main>
|
||||||
</div>
|
</div>
|
||||||
{!isSignInPage && isAuthenticated && <Footer />}
|
{/* TEMPORAIRE : Footer masqué uniquement sur la page agenda pour test layout */}
|
||||||
|
{!isSignInPage && isAuthenticated && !isAgendaPage && <Footer />}
|
||||||
<Toaster />
|
<Toaster />
|
||||||
|
|
||||||
{/* Notifications stack (calls and emails) */}
|
{/* Notifications stack (calls and emails) */}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user