- Implemented FullPagePageIndex component with mock data for database clusters. - Added pagination and bulk actions for managing database clusters. - Created navigation context hooks for detail, edit, duplicate, and create actions. - Introduced a new store for managing state in full-page and single-page modules. feat: add navigation localization files - Added English and Indonesian localization files for navigation menu items. - Included translations for various modules including CRM, Sales, Supply Chain, and more. feat: create system information shortcuts component - Developed Shortcut component to display keyboard shortcuts with search functionality. - Implemented System component to show placeholder information when system details are unavailable. - Added localization for shortcuts and system information in English and Indonesian. feat: implement global theme store - Created a Zustand store for managing theme color scheme with localStorage persistence. feat: add module page header component - Developed ModulePageHeader component for consistent page header across modules. - Included breadcrumb navigation, title, description, and action buttons. feat: define default privileges for enterprise module - Established default privileges for CRUD operations and other actions in the enterprise module.
67 lines
1.7 KiB
TypeScript
67 lines
1.7 KiB
TypeScript
interface NotFoundProps {
|
||
showActionsBack?: boolean;
|
||
showActionsHome?: boolean;
|
||
onClickGoBack?(): void;
|
||
onClickBackToHome?(): void;
|
||
homeUrl?: string;
|
||
}
|
||
|
||
import { Title, Text, Button, Container, Stack, Group, Center } from '@mantine/core';
|
||
import { useNavigate } from 'react-router-dom';
|
||
|
||
export function NotFound({
|
||
showActionsBack = true,
|
||
showActionsHome = true,
|
||
onClickGoBack,
|
||
onClickBackToHome,
|
||
homeUrl,
|
||
}: NotFoundProps) {
|
||
const navigate = useNavigate();
|
||
|
||
function onBack() {
|
||
if (onClickGoBack) onClickGoBack();
|
||
else navigate(-1);
|
||
}
|
||
|
||
function onBackHome() {
|
||
if (onClickBackToHome) onClickBackToHome();
|
||
else if (homeUrl) navigate(homeUrl, { replace: true });
|
||
}
|
||
|
||
return (
|
||
<Container size="sm" h="100vh" pos="relative">
|
||
<Center h="100%">
|
||
<Stack align="center" ta="center" gap="md">
|
||
<Text size="sm" fw={500} tt="uppercase" c="dimmed" lts="var(--mantine-spacing-xs)">
|
||
404 Error
|
||
</Text>
|
||
|
||
<Title order={1} fw={900} c="brand">
|
||
Page Not Found
|
||
</Title>
|
||
|
||
<Text size="md" c="dimmed">
|
||
Sorry, the page you’re looking for doesn’t exist or has been moved.
|
||
</Text>
|
||
|
||
{(showActionsBack || showActionsHome) && (
|
||
<Group mt="xl" justify="center">
|
||
{showActionsBack && (
|
||
<Button variant="default" size="md" onClick={onBack}>
|
||
Go Back
|
||
</Button>
|
||
)}
|
||
|
||
{showActionsHome && (
|
||
<Button color="brand" size="md" onClick={onBackHome}>
|
||
Back to Home
|
||
</Button>
|
||
)}
|
||
</Group>
|
||
)}
|
||
</Stack>
|
||
</Center>
|
||
</Container>
|
||
);
|
||
}
|