website refactor
This commit is contained in:
@@ -4,6 +4,9 @@ import { Button } from '@/ui/Button';
|
||||
import { Icon } from '@/ui/Icon';
|
||||
import { Modal } from '@/ui/Modal';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Grid } from '@/ui/Grid';
|
||||
import { Surface } from '@/ui/Surface';
|
||||
import { NotificationStat, NotificationDeadline } from '@/ui/NotificationContent';
|
||||
import {
|
||||
AlertCircle,
|
||||
@@ -144,17 +147,19 @@ export function ModalNotification({
|
||||
</Text>
|
||||
|
||||
{isRaceNotification && (
|
||||
<div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '1rem', marginTop: '1.5rem' }}>
|
||||
<NotificationStat
|
||||
label="POSITION"
|
||||
value={notification.data?.position === 'DNF' ? 'DNF' : `P${notification.data?.position || '?'}`}
|
||||
/>
|
||||
<NotificationStat
|
||||
label="RATING"
|
||||
value={`${ratingChange >= 0 ? '+' : ''}${ratingChange}`}
|
||||
intent={ratingChange >= 0 ? 'success' : 'critical'}
|
||||
/>
|
||||
</div>
|
||||
<Box marginTop={6}>
|
||||
<Grid cols={2} gap={4}>
|
||||
<NotificationStat
|
||||
label="POSITION"
|
||||
value={notification.data?.position === 'DNF' ? 'DNF' : `P${notification.data?.position || '?'}`}
|
||||
/>
|
||||
<NotificationStat
|
||||
label="RATING"
|
||||
value={`${ratingChange >= 0 ? '+' : ''}${ratingChange}`}
|
||||
intent={ratingChange >= 0 ? 'success' : 'critical'}
|
||||
/>
|
||||
</Grid>
|
||||
</Box>
|
||||
)}
|
||||
|
||||
{hasDeadline && !isRaceNotification && (
|
||||
@@ -166,18 +171,24 @@ export function ModalNotification({
|
||||
)}
|
||||
|
||||
{protestId && (
|
||||
<div style={{ marginTop: '1.5rem', padding: '0.75rem', backgroundColor: 'var(--ui-color-bg-base)', border: '1px solid var(--ui-color-border-default)', borderRadius: 'var(--ui-radius-sm)' }}>
|
||||
<Surface
|
||||
marginTop={6}
|
||||
padding={3}
|
||||
variant="dark"
|
||||
border
|
||||
rounded="sm"
|
||||
>
|
||||
<Text size="xs" variant="low" weight="bold" uppercase block marginBottom={1}>PROTEST ID</Text>
|
||||
<Text size="xs" variant="med" font="mono" block>{protestId}</Text>
|
||||
</div>
|
||||
</Surface>
|
||||
)}
|
||||
|
||||
{notification.requiresResponse && !isRaceNotification && (
|
||||
<div style={{ marginTop: '1rem', textAlign: 'center' }}>
|
||||
<Box marginTop={4} textAlign="center">
|
||||
<Text size="xs" variant="critical" weight="medium">
|
||||
This action is required to continue
|
||||
</Text>
|
||||
</div>
|
||||
</Box>
|
||||
)}
|
||||
</Modal>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user