fix: 🐛 hook isMobile by changing to another

This commit is contained in:
Abdel LAMRANI 2026-07-13 12:27:56 +02:00
parent 81c8686808
commit 6a7bd44063

View file

@ -3,7 +3,7 @@ import { type ReactNode } from "react";
import BackToTop from "@/front/partials/BackToTop";
import Footer from "@/front/partials/Footer";
import useIsMobile from "@/hooks/use-mobile";
import useDeviceType from "@/hooks/use-device-type";
import { positionBannerButton } from "../Components/cookie/constants";
import CookieNotice from "../Components/cookie/CookieNotice";
@ -15,13 +15,14 @@ interface AppLayoutProps {
}
export default function AppLayout({ children }: Readonly<AppLayoutProps>) {
const isMobile = useIsMobile();
const { isMobile } = useDeviceType();
const { canonical } = usePage().props as { canonical?: string };
return (
<RecaptchaProvider>
<div className="flex min-h-screen flex-col">
<CookieNotice
services={["matomo"] as const}
learnMoreHref={route('front.privacy-policy')}
bannerButtonPosition={
isMobile ? positionBannerButton.aside.left : undefined
}