fixed init routes
This commit is contained in:
parent
964ca236e8
commit
2f447cef1a
@ -6,6 +6,7 @@ import LoginTitle from "../components/reg/loginTitle.jsx";
|
|||||||
import {MessageType} from "../backend/notifications/message.tsx";
|
import {MessageType} from "../backend/notifications/message.tsx";
|
||||||
import {displayMessage} from "../backend/notifications/notifications.js";
|
import {displayMessage} from "../backend/notifications/notifications.js";
|
||||||
import {post} from "../backend/api.js";
|
import {post} from "../backend/api.js";
|
||||||
|
import {URLs} from "../__data__/urls";
|
||||||
|
|
||||||
const SignIn = () => {
|
const SignIn = () => {
|
||||||
const [name, setName] = useState("");
|
const [name, setName] = useState("");
|
||||||
@ -37,7 +38,7 @@ const SignIn = () => {
|
|||||||
setNameErrorsCounter(0);
|
setNameErrorsCounter(0);
|
||||||
|
|
||||||
localStorage.setItem('message', 'Successfully logged in!');
|
localStorage.setItem('message', 'Successfully logged in!');
|
||||||
window.location.href = "/";
|
window.location.href = URLs.baseUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -5,6 +5,7 @@ import LoginTitle from "../components/reg/loginTitle.jsx";
|
|||||||
import {post} from "../backend/api";
|
import {post} from "../backend/api";
|
||||||
import {displayMessage} from "../backend/notifications/notifications";
|
import {displayMessage} from "../backend/notifications/notifications";
|
||||||
import {MessageType} from "../backend/notifications/message";
|
import {MessageType} from "../backend/notifications/message";
|
||||||
|
import { URLs } from "../__data__/urls";
|
||||||
|
|
||||||
|
|
||||||
const SignUp = () => {
|
const SignUp = () => {
|
||||||
@ -47,7 +48,7 @@ const SignUp = () => {
|
|||||||
localStorage.setItem('username', name);
|
localStorage.setItem('username', name);
|
||||||
|
|
||||||
localStorage.setItem('message', 'Successfully signed up!');
|
localStorage.setItem('message', 'Successfully signed up!');
|
||||||
window.location.href = "/";
|
window.location.href = URLs.baseUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
Loading…
Reference in New Issue
Block a user