diff --git a/src/Pages/HomePage/UserProfile.jsx b/src/Pages/HomePage/UserProfile.jsx index 1f0f64f..055d145 100644 --- a/src/Pages/HomePage/UserProfile.jsx +++ b/src/Pages/HomePage/UserProfile.jsx @@ -2,13 +2,10 @@ import Avatar from "@mui/material/Avatar"; import Typography from "@mui/material/Typography"; function UserProfile(props) { - const { intraId } = props; + const { intraId, photoUrl } = props; return ( <> - + {intraId} 님 ); diff --git a/src/Pages/HomePage/index.jsx b/src/Pages/HomePage/index.jsx index 5beeabe..a09944f 100644 --- a/src/Pages/HomePage/index.jsx +++ b/src/Pages/HomePage/index.jsx @@ -17,7 +17,7 @@ const getTodayDate = () => { }; const Home = () => { - const { _intraId } = useStore((state) => state); + const { _intraId, _photoUrl } = useStore((state) => state); console.log(_intraId); const [summary, setSummary] = useState({}); const [isOperator, setIsOperator] = useState(false); @@ -54,7 +54,7 @@ const Home = () => { return ( <> - + {getTodayDate()} diff --git a/src/Pages/SignupPage/index.jsx b/src/Pages/SignupPage/index.jsx index 9212253..ecc73c2 100644 --- a/src/Pages/SignupPage/index.jsx +++ b/src/Pages/SignupPage/index.jsx @@ -15,7 +15,7 @@ import PasswordField from "./PasswordField.jsx"; function Signup() { const navigate = useNavigate(); const { state } = useLocation(); - const { _intraId, _server } = useStore((state) => state); + const { _intraId, setPhotoUrl } = useStore((state) => state); // 비밀번호 규칙 확인용 State (boolean) const [isSamePassword, setIsSamePassword] = useState(true); // 사용자 입력 비밀번호 저장 State (string) @@ -90,6 +90,7 @@ function Signup() { }); console.log(response); if (response.status === 201) { + setPhotoUrl(state.photoUrl); // TODO 회원가입 정상적으로 진행되면 login 페이지에서 회원가입 완료 안내 문구 띄워주기 navigate("/"); }