Skip to content

Commit

Permalink
fix: gets info about user with localStorage
Browse files Browse the repository at this point in the history
  • Loading branch information
erarich committed Dec 1, 2023
1 parent e3bd765 commit 5ffbd7a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/pages/Profile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ import { Typography, TextField, Button } from "@mui/material";
export const Profile = () => {
const userInfoState = userInfoStore((state) => state.userInfo);

let storageUserId = localStorage.getItem("userId");
let storageUsername = localStorage.getItem("username");
let storageEmail = localStorage.getItem("email");

const submitSignup = () => {};

return (
Expand All @@ -17,9 +21,9 @@ export const Profile = () => {
<div className={styles.section}>
<div className={styles.forms_box}>
<div style={{ width: "100%" }}></div>
<p>User Name: {userInfoState.userName}</p>
<p>User ID: {userInfoState.id}</p>
<p>Email: {userInfoState.email}</p>
<p>User Name: {storageUsername}</p>
<p>User ID: {storageUserId}</p>
<p>Email: {storageEmail}</p>
<div className={styles.buttons}>
<Button
onClick={() => {
Expand Down

0 comments on commit 5ffbd7a

Please sign in to comment.