Skip to content

Commit

Permalink
feat: 학생 조회 api 호출 실패시 에러 헨들링할 수 있도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
llddang committed Sep 19, 2024
1 parent 3a940fc commit 5ff3d6c
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ import StudentInfoLabel from './StudentInfoLabel';
const StudentInfoSection = () => {
// TODO - 관리자가 로그인한 경우에 대한 처린
const auth = useAppSelector((state) => state.auth).value;
const { data: member } = useStudentMemberQuery(auth.id);
let member;
try {
member = useStudentMemberQuery(auth.id).data;
} catch (err) {
// TODO: server api error handling
}
return (
<div className="relative flex-grow rounded-sm bg-white p-5">
<SubTitle title="내 정보" urlText="수정" url="/my-page/edit" />
Expand Down

0 comments on commit 5ff3d6c

Please sign in to comment.