diff --git a/src/views/login/index.jsx b/src/views/login/index.jsx index 969d9f8..788e938 100644 --- a/src/views/login/index.jsx +++ b/src/views/login/index.jsx @@ -6,7 +6,7 @@ import { Button, Box, makeStyles, Container, Typography, Link } from '@material- import Loading from '@components/Loading'; import UosInput from '@components/UosInput'; import { semesterState } from '@states/Semester'; -import { API_LOGIN, API_GET_SEMESTER, requestAPI, getToken, setToken } from '@utils/api'; +import { API_LOGIN, API_GET_SEMESTER, requestAPI, getToken, setToken, removeUserID, setUserID } from '@utils/api'; import { foregroundColor } from '@utils/styles/Colors'; import useLogoLayoutStyles from '@utils/styles/login/LogoLayout'; import useLoginLabelStyles from '@utils/styles/login/LoginLabel'; @@ -86,6 +86,7 @@ export function LoginBox() { } setToken(response.data.token); + setUserID(response.data.userId); await callSemester(); getSocket(); setLoading(false); @@ -127,6 +128,7 @@ export function LoginBox() { window.location.reload(); return null; } + removeUserID(); return (