|
1 | 1 | <script lang="ts"> |
2 | 2 | import { page } from "$app/state"; |
3 | | - import { Button } from "bits-ui"; |
| 3 | + import { env } from "$env/dynamic/public"; |
| 4 | + import { Button } from "$ui/button"; |
| 5 | + import * as Empty from "$ui/empty"; |
| 6 | + import { Separator } from "$ui/separator"; |
| 7 | + import CircleXIcon from "@lucide/svelte/icons/circle-x"; |
4 | 8 | </script> |
5 | 9 |
|
6 | | -<main class="flex h-screen w-full flex-col items-center justify-center"> |
7 | | - <div class="flex w-full max-w-md flex-col items-center justify-center gap-3 rounded-lg p-6 glass"> |
8 | | - <h1 class="text-center text-2xl font-semibold">Oops! Something went wrong</h1> |
9 | | - <p class="text-center">An error occurred while trying to fetch the stats for '{page.params.ign}'</p> |
10 | | - <p>Try again or contact us if the problem persists.</p> |
11 | | - <Button.Root href="/" class="mx-auto flex w-full max-w-fit items-center justify-center rounded-3xl bg-icon px-6 py-3 text-base font-bold text-white uppercase transition-all duration-150 ease-out [text-shadow:0_0_3px_oklch(0%_0_0/50%)] hover:scale-[1.015] disabled:opacity-50 dark:text-text">Go home</Button.Root> |
12 | | - </div> |
13 | | - <p class="text-xs text-text/40">{page.status}: {page.error?.message}</p> |
| 10 | +<main class="flex h-[calc(100vh-3rem)] w-full flex-col items-center justify-center"> |
| 11 | + <Empty.Root class="border glass max-w-md w-full grow-0"> |
| 12 | + <Empty.Header class="rounded"> |
| 13 | + <Empty.Media variant="icon" class="bg-inherit border"> |
| 14 | + <CircleXIcon /> |
| 15 | + </Empty.Media> |
| 16 | + <Empty.Title>Oops! Something went wrong</Empty.Title> |
| 17 | + <Empty.Description>An error occurred while trying to fetch the stats for '{page.params.ign}'</Empty.Description> |
| 18 | + <Empty.Description>Try again or contact us if the problem persists.</Empty.Description> |
| 19 | + <Separator /> |
| 20 | + <Empty.Description>{page.status}: {page.error?.message}</Empty.Description> |
| 21 | + </Empty.Header> |
| 22 | + <Empty.Content class="flex flex-row gap-4 items-center-safe justify-center-safe"> |
| 23 | + <Button href="/" variant="default">Go home</Button> |
| 24 | + <Button href={env.PUBLIC_DISCORD_INVITE} variant="outline" target="_blank">Join our Discord</Button> |
| 25 | + </Empty.Content> |
| 26 | + </Empty.Root> |
14 | 27 | </main> |
0 commit comments