diff --git a/frontend/src/app-components/auth/Login.tsx b/frontend/src/app-components/auth/Login.tsx
index 1fbdba3e..78bbd138 100755
--- a/frontend/src/app-components/auth/Login.tsx
+++ b/frontend/src/app-components/auth/Login.tsx
@@ -22,6 +22,7 @@ import { useTranslate } from "@/hooks/useTranslate";
import { useValidationRules } from "@/hooks/useValidationRules";
import { ILoginAttributes } from "@/types/auth/login.types";
+import { PublicContentWrapper } from "../../components/anonymous/PublicContentWrapper";
import { ContentContainer } from "../dialogs/layouts/ContentContainer";
import { Adornment } from "../inputs/Adornment";
import { Input } from "../inputs/Input";
@@ -89,7 +90,7 @@ export const Login = () => {
}, [router.query.token]);
return (
-
+
-
+
);
};
diff --git a/frontend/src/app-components/auth/Register.tsx b/frontend/src/app-components/auth/Register.tsx
index deedd7e8..61ddf240 100644
--- a/frontend/src/app-components/auth/Register.tsx
+++ b/frontend/src/app-components/auth/Register.tsx
@@ -30,6 +30,7 @@ import { useValidationRules } from "@/hooks/useValidationRules";
import { IRegisterAttributes } from "@/types/auth/register.types";
import { JWT } from "@/utils/Jwt";
+import { PublicContentWrapper } from "../../components/anonymous/PublicContentWrapper";
import { ContentContainer } from "../dialogs/layouts/ContentContainer";
import { ContentItem } from "../dialogs/layouts/ContentItem";
import { Adornment } from "../inputs/Adornment";
@@ -136,7 +137,7 @@ export const Register = () => {
}, [router.query.token]);
return (
-
+
{
-
+
);
};
diff --git a/frontend/src/app-components/auth/ResetPassword.tsx b/frontend/src/app-components/auth/ResetPassword.tsx
index f68a4466..9c9c8c8b 100644
--- a/frontend/src/app-components/auth/ResetPassword.tsx
+++ b/frontend/src/app-components/auth/ResetPassword.tsx
@@ -17,6 +17,7 @@ import { useToast } from "@/hooks/useToast";
import { useTranslate } from "@/hooks/useTranslate";
import { useValidationRules } from "@/hooks/useValidationRules";
+import { PublicContentWrapper } from "../../components/anonymous/PublicContentWrapper";
import { ContentContainer } from "../dialogs";
import { Adornment } from "../inputs/Adornment";
import { PasswordInput } from "../inputs/PasswordInput";
@@ -55,7 +56,7 @@ export const ResetPassword = () => {
});
return (
-
+
-
+
);
};
diff --git a/frontend/src/app-components/auth/resetPasswordRequest.tsx b/frontend/src/app-components/auth/resetPasswordRequest.tsx
index a5d13135..d773ff31 100644
--- a/frontend/src/app-components/auth/resetPasswordRequest.tsx
+++ b/frontend/src/app-components/auth/resetPasswordRequest.tsx
@@ -14,6 +14,7 @@ import { useRequestResetPassword } from "@/hooks/entities/reset-hooks";
import { useToast } from "@/hooks/useToast";
import { useTranslate } from "@/hooks/useTranslate";
+import { PublicContentWrapper } from "../../components/anonymous/PublicContentWrapper";
import { ContentContainer } from "../dialogs";
import { Input } from "../inputs/Input";
@@ -37,7 +38,7 @@ export const ResetPasswordRequest = () => {
});
return (
-
+
-
+
);
};
diff --git a/frontend/src/components/anonymous/PublicContentWrapper.tsx b/frontend/src/components/anonymous/PublicContentWrapper.tsx
new file mode 100644
index 00000000..2af52cdb
--- /dev/null
+++ b/frontend/src/components/anonymous/PublicContentWrapper.tsx
@@ -0,0 +1,17 @@
+import { CircularProgress, Grid } from "@mui/material";
+import { FC } from "react";
+
+import { useAuth } from "@/hooks/useAuth";
+
+export type PublicContentWrapperProps = { children: React.ReactNode };
+export const PublicContentWrapper: FC = ({
+ children,
+}) => {
+ const { isAuthenticated } = useAuth();
+
+ return (
+
+ {isAuthenticated ? : children}
+
+ );
+};