Files
tinyauth/frontend/src/App.tsx
Stavros b9e35716ac feat: invalid domain warning (#332)
* wip

* refactor: update domain warning layout

* i18n: add domain warning translations

* refactor: rework hooks usage

* feat: clear timeouts

* fix: use useeffect to cleanup timeout

* refactor: rework redirects and history storage

* refactor: rename domain to root domain
2025-09-01 18:22:42 +03:00

13 lines
287 B
TypeScript

import { Navigate } from "react-router";
import { useUserContext } from "./context/user-context";
export const App = () => {
const { isLoggedIn } = useUserContext();
if (isLoggedIn) {
return <Navigate to="/logout" replace />;
}
return <Navigate to="/login" replace />;
};