Improve guest help routing and loading
This commit is contained in:
@@ -13,7 +13,6 @@ import {
|
||||
Clock,
|
||||
MessageSquare,
|
||||
Sparkles,
|
||||
LifeBuoy,
|
||||
UploadCloud,
|
||||
AlertCircle,
|
||||
Check,
|
||||
@@ -188,13 +187,6 @@ export default function Header({ eventToken, title = '' }: { eventToken?: string
|
||||
|
||||
const headerFont = branding.typography?.heading ?? branding.fontFamily ?? undefined;
|
||||
const bodyFont = branding.typography?.body ?? branding.fontFamily ?? undefined;
|
||||
const basePath = eventToken ? `/e/${encodeURIComponent(eventToken)}` : '';
|
||||
const showGalleryHelp = Boolean(
|
||||
basePath
|
||||
&& (location.pathname.startsWith(`${basePath}/gallery`) || location.pathname.startsWith(`${basePath}/photo`))
|
||||
);
|
||||
const galleryHelpHref = basePath ? `${basePath}/help/gallery-and-sharing` : '/help/gallery-and-sharing';
|
||||
|
||||
const headerStyle: React.CSSProperties = {
|
||||
background: `linear-gradient(135deg, ${branding.primaryColor}, ${branding.secondaryColor})`,
|
||||
color: headerTextColor,
|
||||
@@ -259,15 +251,6 @@ export default function Header({ eventToken, title = '' }: { eventToken?: string
|
||||
t={t}
|
||||
/>
|
||||
)}
|
||||
{showGalleryHelp && (
|
||||
<Link
|
||||
to={galleryHelpHref}
|
||||
className="rounded-full bg-white/15 p-2 text-white transition hover:bg-white/30"
|
||||
aria-label={t('header.helpGallery')}
|
||||
>
|
||||
<LifeBuoy className="h-5 w-5" aria-hidden />
|
||||
</Link>
|
||||
)}
|
||||
<AppearanceToggleDropdown />
|
||||
<SettingsSheet />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user