mirror of
https://github.com/ichsankurnia/hats-app.git
synced 2026-12-05 10:56:28 +00:00
5a3629badf
Added the ability to view and re-download leave application forms in the Employee History page (Leave, Permit, and Sick tabs) Added employee alpha stats and employee alpha detail in Employee Performance Page Added total WFO, WFH and WFS in Admin Summary Report Added batch import from Excel files in Admin Manual Attendance
37 lines
1.5 KiB
TypeScript
37 lines
1.5 KiB
TypeScript
'use client'
|
|
|
|
import { useEffect } from "react"
|
|
import Image from "next/image"
|
|
import Link from "next/link"
|
|
import { Button } from "@/components/ui/button"
|
|
import { clientLogger } from "@/lib/logger-client"
|
|
|
|
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 })
|
|
clientLogger.error(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-md 2xl:w-160 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>
|
|
</>
|
|
)
|
|
} |