Merge branch 'trunk'
This commit is contained in:
commit
5e66bef79c
3 changed files with 17 additions and 3 deletions
|
|
@ -28,7 +28,12 @@ export default function Head({ title, description }: HeadProps) {
|
|||
return (
|
||||
<InertiaHead>
|
||||
<title>{title}</title>
|
||||
{description && <meta name="description" content={description} />}
|
||||
{description && (
|
||||
<>
|
||||
<meta name="description" content={description} />
|
||||
<meta property="og:description" content={description} />
|
||||
</>
|
||||
)}
|
||||
{title && <meta property="og:title" content={title} />}
|
||||
<link rel="canonical" href={canonical} />
|
||||
<meta property="og:type" content="website" />
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -293,6 +293,14 @@ export const createServiceHandlers = (
|
|||
);
|
||||
return;
|
||||
}
|
||||
// If the script is already in the DOM, Matomo is already running — do not
|
||||
// re-push into _paq (would trigger "setTrackerUrl/setSiteId registered more
|
||||
// than once" warnings caused by applyDecidedStatuses being called multiple times).
|
||||
// Added 13/07/2026
|
||||
if (document.getElementById("script-matomo")) {
|
||||
notifyConsentChange("matomo", accepted);
|
||||
return;
|
||||
}
|
||||
const w = window;
|
||||
w._paq = w._paq ?? [];
|
||||
w._paq.push(["trackPageView"]);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue