|
1
|
import { ExclamationCircle } from "@medusajs/icons" |
|
2
|
import { Button, Text } from "@medusajs/ui" |
|
3
|
import { useTranslation } from "react-i18next" |
|
4
|
import { Link } from "react-router-dom" |
|
5
|
|
|
6
|
// TODO: Add 404 page |
|
7
|
export const NoMatch = () => { |
|
8
|
const { t } = useTranslation() |
|
9
|
|
|
10
|
const title = t("errorBoundary.notFoundTitle") |
|
11
|
const message = t("errorBoundary.noMatchMessage") |
|
12
|
|
|
13
|
return ( |
|
14
|
<div className="flex size-full min-h-screen items-center justify-center"> |
|
15
|
<div className="flex flex-col items-center gap-y-6"> |
|
16
|
<div className="text-ui-fg-subtle flex flex-col items-center gap-y-3"> |
|
17
|
<ExclamationCircle /> |
|
18
|
<div className="flex flex-col items-center justify-center gap-y-1"> |
|
19
|
<Text size="small" leading="compact" weight="plus"> |
|
20
|
{title} |
|
21
|
</Text> |
|
22
|
<Text |
|
23
|
size="small" |
|
24
|
className="text-ui-fg-muted text-balance text-center" |
|
25
|
> |
|
26
|
{message} |
|
27
|
</Text> |
|
28
|
</div> |
|
29
|
</div> |
|
30
|
<Button asChild size="small" variant="secondary"> |
|
31
|
<Link to="/">{t("errorBoundary.backToDashboard")}</Link> |
|
32
|
</Button> |
|
33
|
</div> |
|
34
|
</div> |
|
35
|
) |
|
36
|
} |