Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom 404 Page #719

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions packages/app/src/app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Typing } from "./typing"

function Notfound() {
return (
<div className=" flex h-[80vh] items-center justify-center">
<Typing />
</div>
)

}

export default Notfound
24 changes: 24 additions & 0 deletions packages/app/src/app/typing.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
"use client"

import React, { useEffect, useState } from "react"

const text = "Page Not Found"

export const Typing = () => {
const [typingText, setTypingText] = useState("")

useEffect(() => {
const timeout = setTimeout(() => {
setTypingText(text.slice(0, typingText.length + 1))
}, 300)

return () => clearTimeout(timeout)
}, [typingText])

return (
<div className="flex flex-col text-center gap-8">
<span className=" text-primary text-8xl font-bold ">404</span>
<span className=" text-primary blinking-cursor text-4xl font-bold ">{typingText}</span>
</div>
)
}
14 changes: 14 additions & 0 deletions packages/app/src/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,17 @@
margin: 0;
}
}

@layer utilities {
.blinking-cursor:after {
content: "|";
@apply text-primary;
animation: blink 1s step-start infinite;
}
}

@keyframes blink {
50% {
opacity: 0;
}
}