-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: persiapan untuk membuat unit vote processor
- Loading branch information
1 parent
578c150
commit a665e05
Showing
19 changed files
with
622 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import { motion } from "framer-motion"; | ||
import { RotateCcw } from "lucide-react"; | ||
|
||
import { Button } from "@sora-vp/ui/button"; | ||
|
||
export function UniversalError(props: { | ||
title: string; | ||
description: string; | ||
errorMessage?: string; | ||
}) { | ||
return ( | ||
<div className="flex h-screen w-screen flex-col items-center justify-center gap-5 p-6"> | ||
<div className="w-[80%] text-center"> | ||
<motion.h1 | ||
initial={{ opacity: 0, y: -25 }} | ||
animate={{ opacity: 1, y: 0 }} | ||
exit={{ opacity: 0, y: -25 }} | ||
transition={{ | ||
duration: 0.3, | ||
}} | ||
className="scroll-m-20 font-mono text-4xl font-extrabold tracking-tight text-red-600 lg:text-5xl" | ||
> | ||
{props.title} | ||
</motion.h1> | ||
<motion.p | ||
initial={{ opacity: 0, y: -25 }} | ||
animate={{ opacity: 1, y: 0 }} | ||
exit={{ opacity: 0, y: -25 }} | ||
transition={{ | ||
duration: 0.3, | ||
delay: 0.2, | ||
}} | ||
className="text-center text-xl leading-7 [&:not(:first-child)]:mt-6" | ||
> | ||
{props.description} | ||
</motion.p> | ||
</div> | ||
|
||
{props.errorMessage ? ( | ||
<motion.div | ||
initial={{ opacity: 0, y: -25 }} | ||
animate={{ opacity: 1, y: 0 }} | ||
exit={{ opacity: 0, y: -25 }} | ||
transition={{ | ||
duration: 0.3, | ||
delay: 0.4, | ||
}} | ||
className="flex flex-col items-center" | ||
> | ||
<p>Pesan Error:</p> | ||
<pre className="w-full border p-2 font-mono">{}</pre> | ||
</motion.div> | ||
) : null} | ||
|
||
<Button onDoubleClick={() => location.reload()}> | ||
<motion.div | ||
initial={{ rotate: -95 }} | ||
animate={{ rotate: 0 }} | ||
transition={{ | ||
type: "spring", | ||
delay: 0.7, | ||
}} | ||
className="mr-2" | ||
> | ||
<RotateCcw className="h-4 w-4" /> | ||
</motion.div> | ||
Muat Ulang | ||
</Button> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { motion } from "framer-motion"; | ||
import { Loader } from "lucide-react"; | ||
|
||
export function UniversalLoading(props: { | ||
title: string; | ||
description: string; | ||
}) { | ||
return ( | ||
<motion.div | ||
initial={{ opacity: 0, x: "-250px" }} | ||
animate={{ opacity: 1, x: 0 }} | ||
exit={{ opacity: 0, x: "-250px" }} | ||
className="flex h-screen w-screen flex-col items-center justify-center" | ||
> | ||
<Loader | ||
size={78} | ||
strokeWidth={1.5} | ||
className="animate-pulse animate-spin" | ||
/> | ||
|
||
<div> | ||
<h3 className="mt-8 scroll-m-20 text-3xl font-semibold tracking-tight"> | ||
{props.title} | ||
</h3> | ||
<p className="text-xl font-light leading-7">{props.description}</p> | ||
</div> | ||
</motion.div> | ||
); | ||
} |
Oops, something went wrong.