Skip to content

Commit

Permalink
updated 404 page
Browse files Browse the repository at this point in the history
  • Loading branch information
day-mon committed Apr 28, 2024
1 parent 00fb463 commit b804267
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions ui/src/pages/Notfound.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { Component, createSignal, Show } from 'solid-js';
import { Component, createSignal } from 'solid-js';
import { AnimationDiv } from '~/components/animated-div.tsx';
import { useLocation } from '@solidjs/router';

export const Notfound: Component = () => {

const [text, setText] = createSignal<string>('')
const [showOther, setShowOther] = createSignal<boolean>(false)
let index = 0
const location = useLocation()

Expand All @@ -14,17 +13,17 @@ export const Notfound: Component = () => {
setText((t) => t + message[index++])
if (index >= message.length) {
clearInterval(interval)
setShowOther(true)
}
}, 100)
return (
<AnimationDiv class={'flex flex-col justify-center bg-primary items-center h-screen'}>
<h1 class={'text-9xl flex flex-row font-bold text-100'}>{text()}</h1>
<Show when={showOther()}>
<h1 class={'text-3xl text-100'}>The page at {location.pathname} does not exist.</h1>
</Show>
<AnimationDiv class={'flex flex-col justify-center bg-primary items-center h-screen animate-pulse'}>
<h1 class={'text-9xl flex flex-row font-bold text-100 animate-bounce'}>{text()}</h1>
<AnimationDiv class={'mt-5'}>
<h1 class={'text-3xl text-100 animate-fade-in-down'}>I think... you're lost
<strong class={'mx-2 text-red-500'}>{location.pathname}</strong>
does not exist.
</h1>
</AnimationDiv>
</AnimationDiv>
);
};


};

0 comments on commit b804267

Please sign in to comment.