misc_pterodactyl-panel/resources/scripts/routers/AuthenticationRouter.tsx

24 lines
1 KiB
TypeScript
Raw Normal View History

2022-11-25 20:25:03 +00:00
import { Route, Routes, useNavigate } from 'react-router-dom';
import LoginContainer from '@/components/auth/LoginContainer';
2019-06-12 05:02:18 +00:00
import ForgotPasswordContainer from '@/components/auth/ForgotPasswordContainer';
2019-06-16 23:57:57 +00:00
import ResetPasswordContainer from '@/components/auth/ResetPasswordContainer';
2019-06-17 01:07:57 +00:00
import LoginCheckpointContainer from '@/components/auth/LoginCheckpointContainer';
2021-01-31 02:01:32 +00:00
import { NotFound } from '@/components/elements/ScreenBlock';
export default () => {
2022-11-25 20:25:03 +00:00
const navigate = useNavigate();
return (
2022-11-25 20:25:03 +00:00
<div className="pt-8 xl:pt-32">
<Routes>
<Route path="login" element={<LoginContainer />} />
<Route path="login/checkpoint/*" element={<LoginCheckpointContainer />} />
<Route path="password" element={<ForgotPasswordContainer />} />
<Route path="password/reset/:token" element={<ResetPasswordContainer />} />
<Route path="*" element={<NotFound onBack={() => navigate('/auth/login')} />} />
</Routes>
</div>
);
};