website refactor
This commit is contained in:
59
apps/website/components/errors/RecoveryActions.tsx
Normal file
59
apps/website/components/errors/RecoveryActions.tsx
Normal file
@@ -0,0 +1,59 @@
|
||||
'use client';
|
||||
|
||||
import React from 'react';
|
||||
import { RefreshCw, Home, LifeBuoy } from 'lucide-react';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Button } from '@/ui/Button';
|
||||
import { Icon } from '@/ui/Icon';
|
||||
|
||||
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 (
|
||||
<Box
|
||||
display="flex"
|
||||
flexWrap="wrap"
|
||||
alignItems="center"
|
||||
justifyContent="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>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user