Skip to content

Commit

Permalink
Update error page.
Browse files Browse the repository at this point in the history
  • Loading branch information
vldr committed Aug 6, 2024
1 parent 3afecab commit 35cd88e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/components/pages/ErrorPage.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, Show } from "solid-js";
import { Component, Match, Show, Switch } from "solid-js";

const ErrorPage: Component<{ message: string }> = (props) => {
const onRetryClick = () => {
Expand All @@ -25,7 +25,15 @@ const ErrorPage: Component<{ message: string }> = (props) => {
</svg>
<div class="text-4xl text-white">Error</div>
<div class="text-xl text-white max-w-lg mt-3 mb-5 text-center">
{props.message}
<Switch fallback={props.message}>
<Match when={props.message == "DoesNotExist"}>
The link you entered is not valid.
</Match>

<Match when={props.message == "IsFull"}>
The link you entered cannot be joined because the session is full.
</Match>
</Switch>
</div>
<div class="flex flex-row">
<Show
Expand Down

0 comments on commit 35cd88e

Please sign in to comment.