diff --git a/webapp/src/components/game/multiplayer/LobbyMultiPlayer.tsx b/webapp/src/components/game/multiplayer/LobbyMultiPlayer.tsx index 7e028ee..dd335be 100644 --- a/webapp/src/components/game/multiplayer/LobbyMultiPlayer.tsx +++ b/webapp/src/components/game/multiplayer/LobbyMultiPlayer.tsx @@ -14,7 +14,7 @@ interface LobbyMultiPlayerProps { const LobbyMultiPlayer: FC = ({ socket, handleCurrentStage, partyCode, users }) => { const [isFetched, setFetched] = useState(true); - const uuid = localStorage.getItem("uuid"); + const uuid = localStorage.getItem("userUUID"); console.log(uuid); const { t } = useTranslation(); diff --git a/webapp/src/components/login/Login.tsx b/webapp/src/components/login/Login.tsx index 8c353fe..26b6b78 100644 --- a/webapp/src/components/login/Login.tsx +++ b/webapp/src/components/login/Login.tsx @@ -29,12 +29,9 @@ const Login = (props: ActionProps) => { try { const user = await axios.post(`${apiEndpoint}/login`, { username, password }); - console.log(user.data); localStorage.setItem("username", user.data.username); localStorage.setItem("score", user.data.totalScore); - localStorage.setItem("nWins", user.data.nWins); - localStorage.setItem("uuid", user.data.uuid); localStorage.setItem("isAuthenticated", JSON.stringify(true)); // Extract data from the response localStorage.setItem('userUUID', user.data.uuid); diff --git a/webapp/src/components/register/Register.tsx b/webapp/src/components/register/Register.tsx index aa05923..2fd4704 100644 --- a/webapp/src/components/register/Register.tsx +++ b/webapp/src/components/register/Register.tsx @@ -27,11 +27,8 @@ const Register = (props:ActionProps) => { setOpenSnackbar(true); const user = await axios.post(`${apiEndpoint}/login`, { username, password }); - console.log(user.data); localStorage.setItem("username", user.data.username); localStorage.setItem("score", user.data.totalScore); - localStorage.setItem("nWins", user.data.nWins); - localStorage.setItem("uuid", user.data.uuid); localStorage.setItem("isAuthenticated", JSON.stringify(true)); // Extract data from the response localStorage.setItem('userUUID', user.data.uuid);