refactor(guest): retire legacy guest app and move shared modules
This commit is contained in:
@@ -4,7 +4,7 @@ import { SizableText as Text } from '@tamagui/text';
|
||||
import { Button } from '@tamagui/button';
|
||||
import { Award, BarChart2, Camera, Flame, Sparkles, Trophy, Users } from 'lucide-react';
|
||||
import AppShell from '../components/AppShell';
|
||||
import PullToRefresh from '@/guest/components/PullToRefresh';
|
||||
import PullToRefresh from '@/shared/guest/components/PullToRefresh';
|
||||
import { useEventData } from '../context/EventDataContext';
|
||||
import { useOptionalGuestIdentity } from '../context/GuestIdentityContext';
|
||||
import {
|
||||
@@ -17,11 +17,11 @@ import {
|
||||
type TopPhotoHighlight,
|
||||
type TrendingEmotionHighlight,
|
||||
} from '../services/achievementsApi';
|
||||
import { useTranslation } from '@/guest/i18n/useTranslation';
|
||||
import { useLocale } from '@/guest/i18n/LocaleContext';
|
||||
import { useTranslation } from '@/shared/guest/i18n/useTranslation';
|
||||
import { useLocale } from '@/shared/guest/i18n/LocaleContext';
|
||||
import { useGuestThemeVariant } from '../lib/guestTheme';
|
||||
import { getBentoSurfaceTokens } from '../lib/bento';
|
||||
import { localizeTaskLabel } from '@/guest/lib/localizeTaskLabel';
|
||||
import { localizeTaskLabel } from '@/shared/guest/lib/localizeTaskLabel';
|
||||
import { buildEventPath } from '../lib/routes';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
@@ -76,9 +76,10 @@ type LeaderboardProps = {
|
||||
emptyCopy: string;
|
||||
formatNumber: (value: number) => string;
|
||||
guestFallback: string;
|
||||
isDark: boolean;
|
||||
};
|
||||
|
||||
function Leaderboard({ title, description, icon: Icon, entries, emptyCopy, formatNumber, guestFallback }: LeaderboardProps) {
|
||||
function Leaderboard({ title, description, icon: Icon, entries, emptyCopy, formatNumber, guestFallback, isDark }: LeaderboardProps) {
|
||||
return (
|
||||
<YStack gap="$2">
|
||||
<XStack alignItems="center" gap="$2">
|
||||
@@ -114,9 +115,9 @@ function Leaderboard({ title, description, icon: Icon, entries, emptyCopy, forma
|
||||
justifyContent="space-between"
|
||||
padding="$2"
|
||||
borderRadius="$card"
|
||||
backgroundColor="rgba(15, 23, 42, 0.05)"
|
||||
backgroundColor={isDark ? 'rgba(255, 255, 255, 0.08)' : 'rgba(15, 23, 42, 0.05)'}
|
||||
borderWidth={1}
|
||||
borderColor="rgba(15, 23, 42, 0.08)"
|
||||
borderColor={isDark ? 'rgba(255, 255, 255, 0.16)' : 'rgba(15, 23, 42, 0.08)'}
|
||||
>
|
||||
<XStack alignItems="center" gap="$2">
|
||||
<Text fontSize="$1" fontWeight="$7" color="$color" opacity={0.7}>
|
||||
@@ -146,9 +147,10 @@ type BadgesGridProps = {
|
||||
badges: AchievementBadge[];
|
||||
emptyCopy: string;
|
||||
completeCopy: string;
|
||||
isDark: boolean;
|
||||
};
|
||||
|
||||
function BadgesGrid({ badges, emptyCopy, completeCopy }: BadgesGridProps) {
|
||||
function BadgesGrid({ badges, emptyCopy, completeCopy, isDark }: BadgesGridProps) {
|
||||
if (badges.length === 0) {
|
||||
return (
|
||||
<Text fontSize="$2" color="$color" opacity={0.7}>
|
||||
@@ -172,8 +174,8 @@ function BadgesGrid({ badges, emptyCopy, completeCopy }: BadgesGridProps) {
|
||||
padding="$2"
|
||||
borderRadius="$card"
|
||||
borderWidth={1}
|
||||
borderColor={badge.earned ? 'rgba(16, 185, 129, 0.4)' : 'rgba(15, 23, 42, 0.1)'}
|
||||
backgroundColor={badge.earned ? 'rgba(16, 185, 129, 0.08)' : 'rgba(255, 255, 255, 0.85)'}
|
||||
borderColor={badge.earned ? 'rgba(16, 185, 129, 0.4)' : isDark ? 'rgba(255, 255, 255, 0.16)' : 'rgba(15, 23, 42, 0.1)'}
|
||||
backgroundColor={badge.earned ? 'rgba(16, 185, 129, 0.08)' : isDark ? 'rgba(255, 255, 255, 0.05)' : 'rgba(255, 255, 255, 0.85)'}
|
||||
gap="$1"
|
||||
>
|
||||
<Text fontSize="$2" fontWeight="$7">
|
||||
@@ -190,7 +192,7 @@ function BadgesGrid({ badges, emptyCopy, completeCopy }: BadgesGridProps) {
|
||||
{badge.earned ? completeCopy : `${progress}/${target}`}
|
||||
</Text>
|
||||
</XStack>
|
||||
<YStack height={6} borderRadius={999} backgroundColor="rgba(15, 23, 42, 0.08)">
|
||||
<YStack height={6} borderRadius={999} backgroundColor={isDark ? 'rgba(255, 255, 255, 0.16)' : 'rgba(15, 23, 42, 0.08)'}>
|
||||
<YStack
|
||||
height={6}
|
||||
borderRadius={999}
|
||||
@@ -209,9 +211,10 @@ type TimelineProps = {
|
||||
points: TimelinePoint[];
|
||||
formatNumber: (value: number) => string;
|
||||
emptyCopy: string;
|
||||
isDark: boolean;
|
||||
};
|
||||
|
||||
function Timeline({ points, formatNumber, emptyCopy }: TimelineProps) {
|
||||
function Timeline({ points, formatNumber, emptyCopy, isDark }: TimelineProps) {
|
||||
if (points.length === 0) {
|
||||
return (
|
||||
<Text fontSize="$2" color="$color" opacity={0.7}>
|
||||
@@ -229,9 +232,9 @@ function Timeline({ points, formatNumber, emptyCopy }: TimelineProps) {
|
||||
justifyContent="space-between"
|
||||
padding="$2"
|
||||
borderRadius="$card"
|
||||
backgroundColor="rgba(15, 23, 42, 0.05)"
|
||||
backgroundColor={isDark ? 'rgba(255, 255, 255, 0.08)' : 'rgba(15, 23, 42, 0.05)'}
|
||||
borderWidth={1}
|
||||
borderColor="rgba(15, 23, 42, 0.08)"
|
||||
borderColor={isDark ? 'rgba(255, 255, 255, 0.16)' : 'rgba(15, 23, 42, 0.08)'}
|
||||
>
|
||||
<Text fontSize="$2" fontWeight="$6">
|
||||
{point.date}
|
||||
@@ -257,6 +260,7 @@ type HighlightsProps = {
|
||||
topPhotoFallbackGuest: string;
|
||||
trendingTitle: string;
|
||||
trendingCountLabel: string;
|
||||
isDark: boolean;
|
||||
};
|
||||
|
||||
function Highlights({
|
||||
@@ -271,6 +275,7 @@ function Highlights({
|
||||
topPhotoFallbackGuest,
|
||||
trendingTitle,
|
||||
trendingCountLabel,
|
||||
isDark,
|
||||
}: HighlightsProps) {
|
||||
if (!topPhoto && !trendingEmotion) {
|
||||
return (
|
||||
@@ -298,7 +303,13 @@ function Highlights({
|
||||
style={{ width: '100%', height: 180, objectFit: 'cover', borderRadius: 16 }}
|
||||
/>
|
||||
) : (
|
||||
<YStack height={180} borderRadius={16} backgroundColor="rgba(15, 23, 42, 0.08)" alignItems="center" justifyContent="center">
|
||||
<YStack
|
||||
height={180}
|
||||
borderRadius={16}
|
||||
backgroundColor={isDark ? 'rgba(255, 255, 255, 0.12)' : 'rgba(15, 23, 42, 0.08)'}
|
||||
alignItems="center"
|
||||
justifyContent="center"
|
||||
>
|
||||
<Text fontSize="$2" color="$color" opacity={0.7}>
|
||||
{topPhotoNoPreview}
|
||||
</Text>
|
||||
@@ -347,9 +358,10 @@ type FeedProps = {
|
||||
emptyCopy: string;
|
||||
guestFallback: string;
|
||||
likesLabel: string;
|
||||
isDark: boolean;
|
||||
};
|
||||
|
||||
function Feed({ feed, formatRelativeTime, locale, formatNumber, emptyCopy, guestFallback, likesLabel }: FeedProps) {
|
||||
function Feed({ feed, formatRelativeTime, locale, formatNumber, emptyCopy, guestFallback, likesLabel, isDark }: FeedProps) {
|
||||
if (feed.length === 0) {
|
||||
return (
|
||||
<Text fontSize="$2" color="$color" opacity={0.7}>
|
||||
@@ -368,9 +380,9 @@ function Feed({ feed, formatRelativeTime, locale, formatNumber, emptyCopy, guest
|
||||
gap="$2"
|
||||
padding="$2"
|
||||
borderRadius="$card"
|
||||
backgroundColor="rgba(15, 23, 42, 0.05)"
|
||||
backgroundColor={isDark ? 'rgba(255, 255, 255, 0.08)' : 'rgba(15, 23, 42, 0.05)'}
|
||||
borderWidth={1}
|
||||
borderColor="rgba(15, 23, 42, 0.08)"
|
||||
borderColor={isDark ? 'rgba(255, 255, 255, 0.16)' : 'rgba(15, 23, 42, 0.08)'}
|
||||
>
|
||||
{item.thumbnail ? (
|
||||
<img
|
||||
@@ -379,8 +391,15 @@ function Feed({ feed, formatRelativeTime, locale, formatNumber, emptyCopy, guest
|
||||
style={{ width: 64, height: 64, objectFit: 'cover', borderRadius: 12 }}
|
||||
/>
|
||||
) : (
|
||||
<YStack width={64} height={64} borderRadius={12} backgroundColor="rgba(15, 23, 42, 0.08)" alignItems="center" justifyContent="center">
|
||||
<Camera size={18} color="#0F172A" />
|
||||
<YStack
|
||||
width={64}
|
||||
height={64}
|
||||
borderRadius={12}
|
||||
backgroundColor={isDark ? 'rgba(255, 255, 255, 0.12)' : 'rgba(15, 23, 42, 0.08)'}
|
||||
alignItems="center"
|
||||
justifyContent="center"
|
||||
>
|
||||
<Camera size={18} color={isDark ? '#F8FAFF' : '#0F172A'} />
|
||||
</YStack>
|
||||
)}
|
||||
<YStack flex={1} gap="$1">
|
||||
@@ -415,7 +434,6 @@ export default function AchievementsScreen() {
|
||||
const { locale } = useLocale();
|
||||
const { isDark } = useGuestThemeVariant();
|
||||
const navigate = useNavigate();
|
||||
const surface = getBentoSurfaceTokens(isDark);
|
||||
const mutedButton = isDark ? 'rgba(255, 255, 255, 0.08)' : 'rgba(15, 23, 42, 0.06)';
|
||||
const mutedButtonBorder = isDark ? 'rgba(255, 255, 255, 0.2)' : 'rgba(15, 23, 42, 0.12)';
|
||||
const [payload, setPayload] = React.useState<AchievementsPayload | null>(null);
|
||||
@@ -576,6 +594,7 @@ export default function AchievementsScreen() {
|
||||
badges={personal?.badges ?? []}
|
||||
emptyCopy={t('achievements.badges.empty', 'No badges yet.')}
|
||||
completeCopy={t('achievements.badges.complete', 'Complete')}
|
||||
isDark={isDark}
|
||||
/>
|
||||
</YStack>
|
||||
</BentoCard>
|
||||
@@ -597,6 +616,7 @@ export default function AchievementsScreen() {
|
||||
topPhotoFallbackGuest={t('achievements.leaderboard.guestFallback', 'Guest')}
|
||||
trendingTitle={t('achievements.highlights.trendingTitle', 'Trending emotion')}
|
||||
trendingCountLabel={t('achievements.highlights.trendingCount', { count: '{count}' }, '{count} photos')}
|
||||
isDark={isDark}
|
||||
/>
|
||||
</BentoCard>
|
||||
|
||||
@@ -613,6 +633,7 @@ export default function AchievementsScreen() {
|
||||
points={highlights?.timeline ?? []}
|
||||
formatNumber={formatNumber}
|
||||
emptyCopy={t('achievements.timeline.empty', 'No timeline data yet.')}
|
||||
isDark={isDark}
|
||||
/>
|
||||
</BentoCard>
|
||||
</YStack>
|
||||
@@ -626,6 +647,7 @@ export default function AchievementsScreen() {
|
||||
emptyCopy={t('achievements.leaderboard.uploadsEmpty', 'No uploads yet.')}
|
||||
formatNumber={formatNumber}
|
||||
guestFallback={t('achievements.leaderboard.guestFallback', 'Guest')}
|
||||
isDark={isDark}
|
||||
/>
|
||||
</BentoCard>
|
||||
<BentoCard isDark={isDark}>
|
||||
@@ -637,6 +659,7 @@ export default function AchievementsScreen() {
|
||||
emptyCopy={t('achievements.leaderboard.likesEmpty', 'No likes yet.')}
|
||||
formatNumber={formatNumber}
|
||||
guestFallback={t('achievements.leaderboard.guestFallback', 'Guest')}
|
||||
isDark={isDark}
|
||||
/>
|
||||
</BentoCard>
|
||||
</YStack>
|
||||
@@ -654,6 +677,7 @@ export default function AchievementsScreen() {
|
||||
emptyCopy={t('achievements.feed.empty', 'The feed is quiet for now.')}
|
||||
guestFallback={t('achievements.leaderboard.guestFallback', 'Guest')}
|
||||
likesLabel={t('achievements.feed.likesLabel', { count: '{count}' }, '{count} likes')}
|
||||
isDark={isDark}
|
||||
/>
|
||||
</BentoCard>
|
||||
) : null}
|
||||
|
||||
@@ -10,8 +10,8 @@ import { useEventData } from '../context/EventDataContext';
|
||||
import { createPhotoShareLink, deletePhoto, fetchGallery, fetchPhoto, likePhoto, unlikePhoto } from '../services/photosApi';
|
||||
import { usePollGalleryDelta } from '../hooks/usePollGalleryDelta';
|
||||
import { useGuestThemeVariant } from '../lib/guestTheme';
|
||||
import { useTranslation } from '@/guest/i18n/useTranslation';
|
||||
import { useLocale } from '@/guest/i18n/LocaleContext';
|
||||
import { useTranslation } from '@/shared/guest/i18n/useTranslation';
|
||||
import { useLocale } from '@/shared/guest/i18n/LocaleContext';
|
||||
import { useNavigate, useSearchParams } from 'react-router-dom';
|
||||
import { buildEventPath } from '../lib/routes';
|
||||
import { getBentoSurfaceTokens } from '../lib/bento';
|
||||
|
||||
@@ -7,10 +7,10 @@ import { ArrowLeft, Loader2 } from 'lucide-react';
|
||||
import AppShell from '../components/AppShell';
|
||||
import StandaloneShell from '../components/StandaloneShell';
|
||||
import SurfaceCard from '../components/SurfaceCard';
|
||||
import PullToRefresh from '@/guest/components/PullToRefresh';
|
||||
import { getHelpArticle, type HelpArticleDetail } from '@/guest/services/helpApi';
|
||||
import { useLocale } from '@/guest/i18n/LocaleContext';
|
||||
import { useTranslation } from '@/guest/i18n/useTranslation';
|
||||
import PullToRefresh from '@/shared/guest/components/PullToRefresh';
|
||||
import { getHelpArticle, type HelpArticleDetail } from '@/shared/guest/services/helpApi';
|
||||
import { useLocale } from '@/shared/guest/i18n/LocaleContext';
|
||||
import { useTranslation } from '@/shared/guest/i18n/useTranslation';
|
||||
import EventLogo from '../components/EventLogo';
|
||||
import { useGuestThemeVariant } from '../lib/guestTheme';
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@ import { Loader2, RefreshCcw, Search } from 'lucide-react';
|
||||
import AppShell from '../components/AppShell';
|
||||
import StandaloneShell from '../components/StandaloneShell';
|
||||
import SurfaceCard from '../components/SurfaceCard';
|
||||
import PullToRefresh from '@/guest/components/PullToRefresh';
|
||||
import { getHelpArticles, type HelpArticleSummary } from '@/guest/services/helpApi';
|
||||
import { useLocale } from '@/guest/i18n/LocaleContext';
|
||||
import { useTranslation } from '@/guest/i18n/useTranslation';
|
||||
import PullToRefresh from '@/shared/guest/components/PullToRefresh';
|
||||
import { getHelpArticles, type HelpArticleSummary } from '@/shared/guest/services/helpApi';
|
||||
import { useLocale } from '@/shared/guest/i18n/LocaleContext';
|
||||
import { useTranslation } from '@/shared/guest/i18n/useTranslation';
|
||||
import EventLogo from '../components/EventLogo';
|
||||
import { useGuestThemeVariant } from '../lib/guestTheme';
|
||||
|
||||
|
||||
@@ -12,14 +12,14 @@ import { buildEventPath } from '../lib/routes';
|
||||
import { useStaggeredReveal } from '../lib/useStaggeredReveal';
|
||||
import { usePollStats } from '../hooks/usePollStats';
|
||||
import { fetchGallery } from '../services/photosApi';
|
||||
import { useTranslation } from '@/guest/i18n/useTranslation';
|
||||
import { useTranslation } from '@/shared/guest/i18n/useTranslation';
|
||||
import { useGuestThemeVariant } from '../lib/guestTheme';
|
||||
import { useLocale } from '@/guest/i18n/LocaleContext';
|
||||
import { useLocale } from '@/shared/guest/i18n/LocaleContext';
|
||||
import { fetchTasks, type TaskItem } from '../services/tasksApi';
|
||||
import { useGuestTaskProgress } from '@/guest/hooks/useGuestTaskProgress';
|
||||
import { useGuestTaskProgress } from '@/shared/guest/hooks/useGuestTaskProgress';
|
||||
import { fetchEmotions } from '../services/emotionsApi';
|
||||
import { getBentoSurfaceTokens } from '../lib/bento';
|
||||
import { useEventBranding } from '@/guest/context/EventBrandingContext';
|
||||
import { useEventBranding } from '@/shared/guest/context/EventBrandingContext';
|
||||
import { useOptionalGuestIdentity } from '../context/GuestIdentityContext';
|
||||
|
||||
type ActionTileProps = {
|
||||
|
||||
@@ -7,7 +7,7 @@ import { Input } from '@tamagui/input';
|
||||
import { Card } from '@tamagui/card';
|
||||
import { Html5Qrcode } from 'html5-qrcode';
|
||||
import { QrCode, ArrowRight } from 'lucide-react';
|
||||
import { useTranslation } from '@/guest/i18n/useTranslation';
|
||||
import { useTranslation } from '@/shared/guest/i18n/useTranslation';
|
||||
import { fetchEvent } from '../services/eventApi';
|
||||
import { readGuestName } from '../context/GuestIdentityContext';
|
||||
import EventLogo from '../components/EventLogo';
|
||||
|
||||
@@ -3,9 +3,9 @@ import { useParams } from 'react-router-dom';
|
||||
import { YStack, XStack } from '@tamagui/stacks';
|
||||
import { SizableText as Text } from '@tamagui/text';
|
||||
import { Card } from '@tamagui/card';
|
||||
import { useTranslation } from '@/guest/i18n/useTranslation';
|
||||
import { useLocale } from '@/guest/i18n/LocaleContext';
|
||||
import { LegalMarkdown } from '@/guest/components/legal-markdown';
|
||||
import { useTranslation } from '@/shared/guest/i18n/useTranslation';
|
||||
import { useLocale } from '@/shared/guest/i18n/LocaleContext';
|
||||
import { LegalMarkdown } from '@/shared/guest/components/legal-markdown';
|
||||
import EventLogo from '../components/EventLogo';
|
||||
import { useGuestThemeVariant } from '../lib/guestTheme';
|
||||
|
||||
|
||||
@@ -2,13 +2,13 @@ import React from 'react';
|
||||
import { useParams } from 'react-router-dom';
|
||||
import { Loader2, Maximize2, Minimize2, Pause, Play } from 'lucide-react';
|
||||
import { AnimatePresence, motion } from 'framer-motion';
|
||||
import { useLiveShowState } from '@/guest/hooks/useLiveShowState';
|
||||
import { useLiveShowPlayback } from '@/guest/hooks/useLiveShowPlayback';
|
||||
import LiveShowStage from '@/guest/components/LiveShowStage';
|
||||
import LiveShowBackdrop from '@/guest/components/LiveShowBackdrop';
|
||||
import { useTranslation } from '@/guest/i18n/useTranslation';
|
||||
import { prefersReducedMotion } from '@/guest/lib/motion';
|
||||
import { resolveLiveShowEffect } from '@/guest/lib/liveShowEffects';
|
||||
import { useLiveShowState } from '@/shared/guest/hooks/useLiveShowState';
|
||||
import { useLiveShowPlayback } from '@/shared/guest/hooks/useLiveShowPlayback';
|
||||
import LiveShowStage from '@/shared/guest/components/LiveShowStage';
|
||||
import LiveShowBackdrop from '@/shared/guest/components/LiveShowBackdrop';
|
||||
import { useTranslation } from '@/shared/guest/i18n/useTranslation';
|
||||
import { prefersReducedMotion } from '@/shared/guest/lib/motion';
|
||||
import { resolveLiveShowEffect } from '@/shared/guest/lib/liveShowEffects';
|
||||
import EventLogo from '../components/EventLogo';
|
||||
|
||||
export default function LiveShowScreen() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { YStack } from '@tamagui/stacks';
|
||||
import { SizableText as Text } from '@tamagui/text';
|
||||
import { useTranslation } from '@/guest/i18n/useTranslation';
|
||||
import { useTranslation } from '@/shared/guest/i18n/useTranslation';
|
||||
|
||||
export default function NotFoundScreen() {
|
||||
const { t } = useTranslation();
|
||||
|
||||
@@ -11,8 +11,8 @@ import SurfaceCard from '../components/SurfaceCard';
|
||||
import ShareSheet from '../components/ShareSheet';
|
||||
import { useEventData } from '../context/EventDataContext';
|
||||
import { fetchGallery, fetchPhoto, likePhoto, createPhotoShareLink } from '../services/photosApi';
|
||||
import { useTranslation } from '@/guest/i18n/useTranslation';
|
||||
import { useLocale } from '@/guest/i18n/LocaleContext';
|
||||
import { useTranslation } from '@/shared/guest/i18n/useTranslation';
|
||||
import { useLocale } from '@/shared/guest/i18n/LocaleContext';
|
||||
import { useGuestThemeVariant } from '../lib/guestTheme';
|
||||
import { buildEventPath } from '../lib/routes';
|
||||
import { pushGuestToast } from '../lib/toast';
|
||||
|
||||
@@ -5,7 +5,7 @@ import { SizableText as Text } from '@tamagui/text';
|
||||
import { Button } from '@tamagui/button';
|
||||
import { Input } from '@tamagui/input';
|
||||
import { Card } from '@tamagui/card';
|
||||
import { useTranslation } from '@/guest/i18n/useTranslation';
|
||||
import { useTranslation } from '@/shared/guest/i18n/useTranslation';
|
||||
import { useEventData } from '../context/EventDataContext';
|
||||
import { useGuestIdentity } from '../context/GuestIdentityContext';
|
||||
import EventLogo from '../components/EventLogo';
|
||||
|
||||
@@ -8,10 +8,10 @@ import { Sheet } from '@tamagui/sheet';
|
||||
import StandaloneShell from '../components/StandaloneShell';
|
||||
import SurfaceCard from '../components/SurfaceCard';
|
||||
import EventLogo from '../components/EventLogo';
|
||||
import { fetchGalleryMeta, fetchGalleryPhotos, type GalleryMetaResponse, type GalleryPhotoResource } from '@/guest/services/galleryApi';
|
||||
import { createPhotoShareLink } from '@/guest/services/photosApi';
|
||||
import { useTranslation } from '@/guest/i18n/useTranslation';
|
||||
import { EventBrandingProvider } from '@/guest/context/EventBrandingContext';
|
||||
import { fetchGalleryMeta, fetchGalleryPhotos, type GalleryMetaResponse, type GalleryPhotoResource } from '@/shared/guest/services/galleryApi';
|
||||
import { createPhotoShareLink } from '@/shared/guest/services/photosApi';
|
||||
import { useTranslation } from '@/shared/guest/i18n/useTranslation';
|
||||
import { EventBrandingProvider } from '@/shared/guest/context/EventBrandingContext';
|
||||
import { mapEventBranding } from '../lib/eventBranding';
|
||||
import { BrandingTheme } from '../lib/brandingTheme';
|
||||
import { useGuestThemeVariant } from '../lib/guestTheme';
|
||||
|
||||
@@ -9,7 +9,7 @@ import { buildEventShareLink } from '../services/eventLink';
|
||||
import { usePollStats } from '../hooks/usePollStats';
|
||||
import { fetchEventQrCode } from '../services/qrApi';
|
||||
import { useGuestThemeVariant } from '../lib/guestTheme';
|
||||
import { useTranslation } from '@/guest/i18n/useTranslation';
|
||||
import { useTranslation } from '@/shared/guest/i18n/useTranslation';
|
||||
import { getBentoSurfaceTokens } from '../lib/bento';
|
||||
import { pushGuestToast } from '../lib/toast';
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@ import { AlertCircle, Download, Maximize2, X } from 'lucide-react';
|
||||
import StandaloneShell from '../components/StandaloneShell';
|
||||
import SurfaceCard from '../components/SurfaceCard';
|
||||
import EventLogo from '../components/EventLogo';
|
||||
import { fetchPhotoShare } from '@/guest/services/photosApi';
|
||||
import type { EventBrandingPayload } from '@/guest/services/eventApi';
|
||||
import { useTranslation } from '@/guest/i18n/useTranslation';
|
||||
import { EventBrandingProvider } from '@/guest/context/EventBrandingContext';
|
||||
import { fetchPhotoShare } from '@/shared/guest/services/photosApi';
|
||||
import type { EventBrandingPayload } from '@/shared/guest/services/eventApi';
|
||||
import { useTranslation } from '@/shared/guest/i18n/useTranslation';
|
||||
import { EventBrandingProvider } from '@/shared/guest/context/EventBrandingContext';
|
||||
import { mapEventBranding } from '../lib/eventBranding';
|
||||
import { BrandingTheme } from '../lib/brandingTheme';
|
||||
import { useGuestThemeVariant } from '../lib/guestTheme';
|
||||
|
||||
@@ -4,7 +4,7 @@ import { ChevronLeft, ChevronRight, Pause, Play, Maximize2, Minimize2 } from 'lu
|
||||
import { useEventData } from '../context/EventDataContext';
|
||||
import EventLogo from '../components/EventLogo';
|
||||
import { fetchGallery, type GalleryPhoto } from '../services/photosApi';
|
||||
import { useTranslation } from '@/guest/i18n/useTranslation';
|
||||
import { useTranslation } from '@/shared/guest/i18n/useTranslation';
|
||||
|
||||
function normalizeImageUrl(src?: string | null) {
|
||||
if (!src) return '';
|
||||
|
||||
@@ -9,7 +9,7 @@ import SurfaceCard from '../components/SurfaceCard';
|
||||
import { fetchTasks, type TaskItem } from '../services/tasksApi';
|
||||
import { useEventData } from '../context/EventDataContext';
|
||||
import { buildEventPath } from '../lib/routes';
|
||||
import { useTranslation } from '@/guest/i18n/useTranslation';
|
||||
import { useTranslation } from '@/shared/guest/i18n/useTranslation';
|
||||
import { useGuestThemeVariant } from '../lib/guestTheme';
|
||||
|
||||
function getTaskValue(task: TaskItem, key: string): string | undefined {
|
||||
|
||||
@@ -6,13 +6,13 @@ import { Trophy, Play } from 'lucide-react';
|
||||
import AppShell from '../components/AppShell';
|
||||
import TaskHeroCard, { type TaskHero } from '../components/TaskHeroCard';
|
||||
import { useEventData } from '../context/EventDataContext';
|
||||
import { useTranslation } from '@/guest/i18n/useTranslation';
|
||||
import { useLocale } from '@/guest/i18n/LocaleContext';
|
||||
import { useTranslation } from '@/shared/guest/i18n/useTranslation';
|
||||
import { useLocale } from '@/shared/guest/i18n/LocaleContext';
|
||||
import { fetchTasks } from '../services/tasksApi';
|
||||
import { fetchEmotions } from '../services/emotionsApi';
|
||||
import { useGuestThemeVariant } from '../lib/guestTheme';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useGuestTaskProgress } from '@/guest/hooks/useGuestTaskProgress';
|
||||
import { useGuestTaskProgress } from '@/shared/guest/hooks/useGuestTaskProgress';
|
||||
import { getBentoSurfaceTokens } from '../lib/bento';
|
||||
import { buildEventPath } from '../lib/routes';
|
||||
|
||||
|
||||
@@ -6,11 +6,11 @@ import { RefreshCcw, Trash2, UploadCloud } from 'lucide-react';
|
||||
import AppShell from '../components/AppShell';
|
||||
import SurfaceCard from '../components/SurfaceCard';
|
||||
import { useUploadQueue } from '../services/uploadApi';
|
||||
import { useTranslation } from '@/guest/i18n/useTranslation';
|
||||
import { useTranslation } from '@/shared/guest/i18n/useTranslation';
|
||||
import { useGuestThemeVariant } from '../lib/guestTheme';
|
||||
import { useLocale } from '@/guest/i18n/LocaleContext';
|
||||
import { useLocale } from '@/shared/guest/i18n/LocaleContext';
|
||||
import { useEventData } from '../context/EventDataContext';
|
||||
import { fetchPendingUploadsSummary, type PendingUpload } from '@/guest/services/pendingUploadsApi';
|
||||
import { fetchPendingUploadsSummary, type PendingUpload } from '@/shared/guest/services/pendingUploadsApi';
|
||||
|
||||
type ProgressMap = Record<number, number>;
|
||||
|
||||
|
||||
@@ -9,15 +9,15 @@ import { useOptionalGuestIdentity } from '../context/GuestIdentityContext';
|
||||
import { uploadPhoto, useUploadQueue } from '../services/uploadApi';
|
||||
import { useGuestThemeVariant } from '../lib/guestTheme';
|
||||
import { useNavigate, useSearchParams } from 'react-router-dom';
|
||||
import { useTranslation } from '@/guest/i18n/useTranslation';
|
||||
import { useGuestTaskProgress } from '@/guest/hooks/useGuestTaskProgress';
|
||||
import { fetchPendingUploadsSummary, type PendingUpload } from '@/guest/services/pendingUploadsApi';
|
||||
import { resolveUploadErrorDialog, type UploadErrorDialog } from '@/guest/lib/uploadErrorDialog';
|
||||
import { useTranslation } from '@/shared/guest/i18n/useTranslation';
|
||||
import { useGuestTaskProgress } from '@/shared/guest/hooks/useGuestTaskProgress';
|
||||
import { fetchPendingUploadsSummary, type PendingUpload } from '@/shared/guest/services/pendingUploadsApi';
|
||||
import { resolveUploadErrorDialog, type UploadErrorDialog } from '@/shared/guest/lib/uploadErrorDialog';
|
||||
import { fetchTasks, type TaskItem } from '../services/tasksApi';
|
||||
import { pushGuestToast } from '../lib/toast';
|
||||
import { getBentoSurfaceTokens } from '../lib/bento';
|
||||
import { buildEventPath } from '../lib/routes';
|
||||
import { compressPhoto, formatBytes } from '@/guest/lib/image';
|
||||
import { compressPhoto, formatBytes } from '@/shared/guest/lib/image';
|
||||
|
||||
function getTaskValue(task: TaskItem, key: string): string | undefined {
|
||||
const value = task?.[key as keyof TaskItem];
|
||||
|
||||
Reference in New Issue
Block a user