Skip to content

Commit

Permalink
feat: 유효하지 않은 초대 페이지 접속 시 처리
Browse files Browse the repository at this point in the history
  • Loading branch information
surinkwon committed Oct 5, 2024
1 parent a39ae7c commit 2e79fa2
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions frontend/src/pages/invite/InvitePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const InvitePage = () => {

switch (response.status) {
case 201:
alert("프로젝트에 참여되었습니다.");
alert("참여 요청을 보냈습니다.");
navigate("/projects");
break;
case 200:
Expand All @@ -43,9 +43,16 @@ const InvitePage = () => {
navigate(ROUTER_URL.LOGIN, { replace: true });
}

getInvitePreview(projectUUID!).then((response) => {
setProjectInfo(response.data);
});
getInvitePreview(projectUUID!)
.then((response) => {
setProjectInfo(response.data);
})
.catch((error) => {
if (error.response.status === 404) {
alert("유효하지 않은 요청 링크입니다.");
navigate("/projects");
}
});

return () => {
if (checkAccessToken()) {
Expand Down

0 comments on commit 2e79fa2

Please sign in to comment.