42 lines
1.4 KiB
TypeScript
42 lines
1.4 KiB
TypeScript
import { ROUTES_ENUM } from '@/routes/route.constant'
|
|
import { useLocalization } from '@/utils/hooks/useLocalization'
|
|
import { Helmet } from 'react-helmet'
|
|
import { useNavigate } from 'react-router-dom'
|
|
|
|
const NotFoundPage = () => {
|
|
const navigate = useNavigate()
|
|
const { translate } = useLocalization()
|
|
|
|
const currentPath = location.pathname
|
|
const isAdminPath = currentPath.startsWith('/admin')
|
|
|
|
return (
|
|
<div className="p-28">
|
|
<Helmet
|
|
titleTemplate="%s | Erp Platform"
|
|
title={translate('::' + 'Not Found')}
|
|
defaultTitle="Erp Platform"
|
|
></Helmet>
|
|
<div className="flex items-center justify-center font-inter">
|
|
<div className="text-[8rem] sm:text-[10rem] md:text-[12rem] font-bold bg-gradient-to-br from-primary to-secondary bg-clip-text animate-pulse">
|
|
404
|
|
</div>
|
|
</div>
|
|
<p className="flex items-center justify-center text-xl mb-6 text-gray-600">
|
|
{translate('::Public.notFound.message')}
|
|
</p>
|
|
<div className="flex items-center justify-center font-inter">
|
|
<button
|
|
onClick={() =>
|
|
navigate(isAdminPath ? ROUTES_ENUM.protected.dashboard : ROUTES_ENUM.public.home)
|
|
}
|
|
className="px-6 py-3 bg-blue-500 rounded-xl shadow hover:bg-blue-600 transition"
|
|
>
|
|
{translate('::Public.notFound.button')}
|
|
</button>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default NotFoundPage
|