Remove gallery route padding
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled

This commit is contained in:
Codex Agent
2026-01-14 15:58:40 +01:00
parent d0559bf8c9
commit 289ef70e53

View File

@@ -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 <EventLoadingView />;
@@ -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 (
<LocaleProvider defaultLocale={eventLocale} storageKey={localeStorageKey}>
<EventBrandingProvider branding={branding}>
@@ -125,7 +129,7 @@ function EventBoundary({ token }: { token: string }) {
<NotificationCenterProvider eventToken={token}>
<div className="pb-16">
<Header eventToken={token} />
<div className="px-4 py-3">
<div className={contentPaddingClass}>
<RouteTransition />
</div>
<BottomNav />