mirror of
https://github.com/ichsankurnia/hats-app.git
synced 2026-12-06 20:56:29 +00:00
initial commit for new hats app
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
'use client'
|
||||
|
||||
import { useEffect } from "react"
|
||||
import Image from "next/image"
|
||||
import Link from "next/link"
|
||||
import { Button } from "@/components/ui/button"
|
||||
|
||||
export default function Error({
|
||||
error,
|
||||
reset,
|
||||
}: {
|
||||
error: Error
|
||||
reset: () => void
|
||||
}) {
|
||||
|
||||
useEffect(() => {
|
||||
console.log({ name: error.name, cause: error.cause, message: error.message, stack: error.stack })
|
||||
}, [error])
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="h-[85vh] flex flex-col justify-center items-center overflow-x-hidden overflow-y-auto py-5">
|
||||
<Image alt='ilustrations' height={0} width={0} quality={70} src='/assets/illustrations/maintenance.svg' className='w-80 md:w-[28rem] 2xl:w-[40rem] shadow-sm rounded-full object-cover' />
|
||||
<h2 className="text-xl sm:text-2xl font-semibold tracking-tight text-center">Oopps.. something went wrong!</h2>
|
||||
<span className="text-center mt-1 mb-6 text-zinc-600 dark:text-zinc-400 md:w-9/12 break-all px-2 sm:px-0">{error.message || 'Sorry, system error has occurred'}</span>
|
||||
<div className="flex items-center space-x-2">
|
||||
<Button onClick={() => window.location.reload()} variant='secondary' className="w-28">Try Again</Button>
|
||||
<Link href='/auth'>
|
||||
<Button variant='outline' className="w-28">Login</Button>
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user