Fix TypeScript typecheck errors
This commit is contained in:
@@ -18,6 +18,7 @@ import { TenantEvent, getEvents } from '../../api';
|
||||
import { setTabHistory } from '../lib/tabHistory';
|
||||
import { loadPhotoQueue } from '../lib/photoModerationQueue';
|
||||
import { countQueuedPhotoActions } from '../lib/queueStatus';
|
||||
import { useDocumentTitle } from '../hooks/useDocumentTitle';
|
||||
import { useAdminTheme } from '../theme';
|
||||
import { useAuth } from '../../auth/context';
|
||||
import { EventSwitcherSheet } from './EventSwitcherSheet';
|
||||
@@ -25,13 +26,14 @@ import { UserMenuSheet } from './UserMenuSheet';
|
||||
|
||||
type MobileShellProps = {
|
||||
title?: string;
|
||||
subtitle?: string;
|
||||
children: React.ReactNode;
|
||||
activeTab: NavKey;
|
||||
onBack?: () => void;
|
||||
headerActions?: React.ReactNode;
|
||||
};
|
||||
|
||||
export function MobileShell({ title, children, activeTab, onBack, headerActions }: MobileShellProps) {
|
||||
export function MobileShell({ title, subtitle, children, activeTab, onBack, headerActions }: MobileShellProps) {
|
||||
const { events, activeEvent, selectEvent } = useEventContext();
|
||||
const { user } = useAuth();
|
||||
const { go } = useMobileNav(activeEvent?.slug, activeTab);
|
||||
@@ -40,6 +42,8 @@ export function MobileShell({ title, children, activeTab, onBack, headerActions
|
||||
const { t } = useTranslation('mobile');
|
||||
const { count: notificationCount } = useNotificationsBadge();
|
||||
const online = useOnlineStatus();
|
||||
|
||||
useDocumentTitle(title);
|
||||
|
||||
const theme = useAdminTheme();
|
||||
|
||||
@@ -360,6 +364,18 @@ export function MobileShell({ title, children, activeTab, onBack, headerActions
|
||||
) : null}
|
||||
</MobileCard>
|
||||
) : null}
|
||||
{subtitle ? (
|
||||
<YStack space="$1">
|
||||
{title ? (
|
||||
<Text fontSize="$lg" fontWeight="800" color={theme.textStrong}>
|
||||
{title}
|
||||
</Text>
|
||||
) : null}
|
||||
<Text fontSize="$sm" color={theme.muted}>
|
||||
{subtitle}
|
||||
</Text>
|
||||
</YStack>
|
||||
) : null}
|
||||
{children}
|
||||
</YStack>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user