Files
gridpilot.gg/apps/website/components/errors/RecoveryActions.tsx
2026-01-18 16:43:32 +01:00

59 lines
1.3 KiB
TypeScript

'use client';
import { Button } from '@/ui/Button';
import { Icon } from '@/ui/Icon';
import { Stack } from '@/ui/primitives/Stack';
import { Home, LifeBuoy, RefreshCw } from 'lucide-react';
interface RecoveryActionsProps {
onRetry: () => void;
onHome: () => void;
}
/**
* RecoveryActions
*
* Provides primary and secondary recovery paths for the user.
* Part of the 500 route redesign.
*/
export function RecoveryActions({ onRetry, onHome }: RecoveryActionsProps) {
return (
<Stack
direction="row"
wrap
align="center"
justify="center"
gap={3}
fullWidth
>
<Button
variant="primary"
onClick={onRetry}
icon={<Icon icon={RefreshCw} size={4} />}
width="160px"
>
Retry Session
</Button>
<Button
variant="secondary"
onClick={onHome}
icon={<Icon icon={Home} size={4} />}
width="160px"
>
Return to Pits
</Button>
<Button
variant="secondary"
as="a"
href="https://support.gridpilot.com"
target="_blank"
rel="noopener noreferrer"
icon={<Icon icon={LifeBuoy} size={4} />}
width="160px"
>
Contact Support
</Button>
</Stack>
);
}