From 2f447cef1acb37ff87fa1e51d23c9996980270c7 Mon Sep 17 00:00:00 2001 From: Nikolai Petukhov Date: Sat, 12 Oct 2024 12:44:04 +0300 Subject: [PATCH] fixed init routes --- src/pages/SignIn.jsx | 3 ++- src/pages/SignUp.jsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pages/SignIn.jsx b/src/pages/SignIn.jsx index 878a297..8e816bb 100644 --- a/src/pages/SignIn.jsx +++ b/src/pages/SignIn.jsx @@ -6,6 +6,7 @@ import LoginTitle from "../components/reg/loginTitle.jsx"; import {MessageType} from "../backend/notifications/message.tsx"; import {displayMessage} from "../backend/notifications/notifications.js"; import {post} from "../backend/api.js"; +import {URLs} from "../__data__/urls"; const SignIn = () => { const [name, setName] = useState(""); @@ -37,7 +38,7 @@ const SignIn = () => { setNameErrorsCounter(0); localStorage.setItem('message', 'Successfully logged in!'); - window.location.href = "/"; + window.location.href = URLs.baseUrl; } return ( diff --git a/src/pages/SignUp.jsx b/src/pages/SignUp.jsx index 24a517d..7d6073a 100644 --- a/src/pages/SignUp.jsx +++ b/src/pages/SignUp.jsx @@ -5,6 +5,7 @@ import LoginTitle from "../components/reg/loginTitle.jsx"; import {post} from "../backend/api"; import {displayMessage} from "../backend/notifications/notifications"; import {MessageType} from "../backend/notifications/message"; +import { URLs } from "../__data__/urls"; const SignUp = () => { @@ -47,7 +48,7 @@ const SignUp = () => { localStorage.setItem('username', name); localStorage.setItem('message', 'Successfully signed up!'); - window.location.href = "/"; + window.location.href = URLs.baseUrl; } return (