website refactor
This commit is contained in:
@@ -8,7 +8,12 @@ import {
|
||||
updateRaceAction
|
||||
} from '@/app/actions/leagueScheduleActions';
|
||||
import { StatefulPageWrapper } from '@/components/shared/state/StatefulPageWrapper';
|
||||
import { SharedConfirmDialog, SharedStack, SharedCard, SharedBox, SharedText, SharedHeading } from '@/components/shared/UIComponents';
|
||||
import { ConfirmDialog } from '@/components/shared/ConfirmDialog';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Card } from '@/ui/Card';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { Heading } from '@/ui/Heading';
|
||||
import {
|
||||
useLeagueAdminSchedule,
|
||||
useLeagueAdminStatus,
|
||||
@@ -172,16 +177,16 @@ export function LeagueAdminSchedulePageClient() {
|
||||
// Render admin access required if not admin
|
||||
if (!isLoading && !isAdmin) {
|
||||
return (
|
||||
<SharedStack gap={6}>
|
||||
<SharedCard>
|
||||
<SharedBox p={6} textAlign="center">
|
||||
<SharedHeading level={3}>Admin Access Required</SharedHeading>
|
||||
<SharedBox mt={2}>
|
||||
<SharedText size="sm" color="text-gray-400">Only league admins can manage the schedule.</SharedText>
|
||||
</SharedBox>
|
||||
</SharedBox>
|
||||
</SharedCard>
|
||||
</SharedStack>
|
||||
<Stack gap={6}>
|
||||
<Card>
|
||||
<Box p={6} textAlign="center">
|
||||
<Heading level={3}>Admin Access Required</Heading>
|
||||
<Box mt={2}>
|
||||
<Text size="sm" color="text-gray-400">Only league admins can manage the schedule.</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
</Card>
|
||||
</Stack>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -221,7 +226,7 @@ export function LeagueAdminSchedulePageClient() {
|
||||
setForm(new RaceScheduleCommandModel(form.toCommand()));
|
||||
}}
|
||||
/>
|
||||
<SharedConfirmDialog
|
||||
<ConfirmDialog
|
||||
isOpen={!!raceToDelete}
|
||||
onClose={() => setRaceToDelete(null)}
|
||||
onConfirm={confirmDelete}
|
||||
|
||||
Reference in New Issue
Block a user