weiterer fortschritt mit tamagui und dem neuen mobile event admin
This commit is contained in:
@@ -5,14 +5,12 @@ import { YStack, XStack } from '@tamagui/stacks';
|
||||
import { SizableText as Text } from '@tamagui/text';
|
||||
import { Pressable } from '@tamagui/react-native-web-lite';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { MobileScaffold } from './components/Scaffold';
|
||||
import { MobileShell } from './components/MobileShell';
|
||||
import { MobileCard, PillBadge, CTAButton } from './components/Primitives';
|
||||
import { BottomNav } from './components/BottomNav';
|
||||
import { getEvents, TenantEvent } from '../api';
|
||||
import { adminPath } from '../constants';
|
||||
import { isAuthError } from '../auth/tokens';
|
||||
import { getApiErrorMessage } from '../lib/apiError';
|
||||
import { useMobileNav } from './hooks/useMobileNav';
|
||||
|
||||
export default function MobileEventsPage() {
|
||||
const { t } = useTranslation('management');
|
||||
@@ -20,7 +18,6 @@ export default function MobileEventsPage() {
|
||||
const [events, setEvents] = React.useState<TenantEvent[]>([]);
|
||||
const [loading, setLoading] = React.useState(true);
|
||||
const [error, setError] = React.useState<string | null>(null);
|
||||
const { go } = useMobileNav();
|
||||
const [query, setQuery] = React.useState('');
|
||||
|
||||
React.useEffect(() => {
|
||||
@@ -38,17 +35,15 @@ export default function MobileEventsPage() {
|
||||
}, [t]);
|
||||
|
||||
return (
|
||||
<MobileScaffold
|
||||
<MobileShell
|
||||
activeTab="home"
|
||||
title={t('events.list.dashboardTitle', 'All Events Dashboard')}
|
||||
onBack={() => navigate(-1)}
|
||||
rightSlot={
|
||||
headerActions={
|
||||
<Pressable>
|
||||
<Search size={18} color="#0f172a" />
|
||||
</Pressable>
|
||||
}
|
||||
footer={
|
||||
<BottomNav active="home" onNavigate={go} />
|
||||
}
|
||||
>
|
||||
{error ? (
|
||||
<MobileCard>
|
||||
@@ -111,7 +106,7 @@ export default function MobileEventsPage() {
|
||||
))}
|
||||
</YStack>
|
||||
)}
|
||||
</MobileScaffold>
|
||||
</MobileShell>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user