From 289ef70e53835d5eff4dfada0be6b89ed3d5bc63 Mon Sep 17 00:00:00 2001 From: Codex Agent Date: Wed, 14 Jan 2026 15:58:40 +0100 Subject: [PATCH] Remove gallery route padding --- resources/js/guest/router.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/resources/js/guest/router.tsx b/resources/js/guest/router.tsx index 1de7faa..c6269c4 100644 --- a/resources/js/guest/router.tsx +++ b/resources/js/guest/router.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { Button } from '@/components/ui/button'; -import { createBrowserRouter, useParams, Link, Navigate } from 'react-router-dom'; +import { createBrowserRouter, useLocation, useParams, Link, Navigate } from 'react-router-dom'; import Header from './components/Header'; import BottomNav from './components/BottomNav'; import RouteTransition from './components/RouteTransition'; @@ -101,6 +101,7 @@ export const router = createBrowserRouter([ function EventBoundary({ token }: { token: string }) { const identity = useOptionalGuestIdentity(); const { event, status, error, errorCode } = useEventData(); + const location = useLocation(); if (status === 'loading') { return ; @@ -118,6 +119,9 @@ function EventBoundary({ token }: { token: string }) { const localeStorageKey = `guestLocale_event_${event.id ?? token}`; const branding = mapEventBranding(event.branding ?? (event as any)?.settings?.branding ?? null); + const isGalleryRoute = /^\/e\/[^/]+\/gallery(?:\/|$)/.test(location.pathname); + const contentPaddingClass = isGalleryRoute ? 'px-0 py-0' : 'px-4 py-3'; + return ( @@ -125,7 +129,7 @@ function EventBoundary({ token }: { token: string }) {
-
+