refactor(guest): retire legacy guest app and move shared modules
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-02-06 08:42:53 +01:00
parent b14435df8b
commit 0a08f2704f
191 changed files with 243 additions and 12631 deletions

View File

@@ -2,9 +2,9 @@ import { Theme } from '@tamagui/core';
import React from 'react';
import type { Appearance } from '@/hooks/use-appearance';
import { useAppearance } from '@/hooks/use-appearance';
import { useEventBranding } from '@/guest/context/EventBrandingContext';
import { relativeLuminance } from '@/guest/lib/color';
import type { EventBranding } from '@/guest/types/event-branding';
import { useEventBranding } from '@/shared/guest/context/EventBrandingContext';
import { relativeLuminance } from '@/shared/guest/lib/color';
import type { EventBranding } from '@/shared/guest/types/event-branding';
const LIGHT_LUMINANCE_THRESHOLD = 0.65;
const DARK_LUMINANCE_THRESHOLD = 0.35;

View File

@@ -0,0 +1,20 @@
export function shouldCacheResponse(response: Response | null): boolean {
if (!response) {
return false;
}
const cacheControl = response.headers.get('Cache-Control') ?? '';
const pragma = response.headers.get('Pragma') ?? '';
const normalizedCacheControl = cacheControl.toLowerCase();
const normalizedPragma = pragma.toLowerCase();
if (normalizedCacheControl.includes('no-store') || normalizedCacheControl.includes('private')) {
return false;
}
if (normalizedPragma.includes('no-cache')) {
return false;
}
return true;
}

View File

@@ -1,5 +1,5 @@
import type { EventBranding } from '@/guest/types/event-branding';
import type { EventBrandingPayload } from '@/guest/services/eventApi';
import type { EventBranding } from '@/shared/guest/types/event-branding';
import type { EventBrandingPayload } from '@/shared/guest/services/eventApi';
export function mapEventBranding(raw?: EventBrandingPayload | null): EventBranding | null {
if (!raw) {

View File

@@ -1,5 +1,5 @@
import { DEFAULT_EVENT_BRANDING, useOptionalEventBranding } from '@/guest/context/EventBrandingContext';
import type { EventBranding } from '@/guest/types/event-branding';
import { DEFAULT_EVENT_BRANDING, useOptionalEventBranding } from '@/shared/guest/context/EventBrandingContext';
import type { EventBranding } from '@/shared/guest/types/event-branding';
import { useAppearance, type Appearance } from '@/hooks/use-appearance';
import { resolveGuestThemeName } from './brandingTheme';