erp-platform/ui/src/views/NotFound.tsx

43 lines
1.4 KiB
TypeScript
Raw Normal View History

2025-08-11 06:34:44 +00:00
import { ROUTES_ENUM } from '@/routes/route.constant'
import { useLocalization } from '@/utils/hooks/useLocalization'
2025-08-14 07:10:56 +00:00
import { Helmet } from 'react-helmet'
2025-07-28 12:48:30 +00:00
import { useNavigate } from 'react-router-dom'
2025-06-28 21:34:28 +00:00
const NotFoundPage = () => {
2025-07-28 12:48:30 +00:00
const navigate = useNavigate()
const { translate } = useLocalization()
const currentPath = location.pathname
const isAdminPath = currentPath.startsWith('/admin')
2025-07-28 12:48:30 +00:00
2025-06-28 21:34:28 +00:00
return (
<div className="p-28">
2025-08-14 07:10:56 +00:00
<Helmet
2025-09-13 11:46:34 +00:00
titleTemplate="%s | Sözsoft Kurs Platform"
2025-08-14 07:10:56 +00:00
title={translate('::' + 'Not Found')}
2025-09-13 11:46:34 +00:00
defaultTitle="Sözsoft Kurs Platform"
2025-08-14 07:10:56 +00:00
></Helmet>
2025-07-28 12:48:30 +00:00
<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">
2025-06-28 21:34:28 +00:00
404
</div>
2025-07-28 12:48:30 +00:00
</div>
2025-08-11 06:34:44 +00:00
<p className="flex items-center justify-center text-xl mb-6 text-gray-600">
{translate('::Public.notFound.message')}
2025-08-11 06:34:44 +00:00
</p>
2025-07-28 12:48:30 +00:00
<div className="flex items-center justify-center font-inter">
2025-08-11 06:34:44 +00:00
<button
2025-08-14 07:10:56 +00:00
onClick={() =>
navigate(isAdminPath ? ROUTES_ENUM.protected.dashboard : ROUTES_ENUM.public.home)
}
2025-08-29 18:14:29 +00:00
className="px-6 py-3 bg-blue-500 rounded-xl shadow hover:bg-blue-600 transition"
2025-08-11 06:34:44 +00:00
>
{translate('::Public.notFound.button')}
2025-08-11 06:34:44 +00:00
</button>
2025-07-28 12:48:30 +00:00
</div>
2025-06-28 21:34:28 +00:00
</div>
)
}
export default NotFoundPage