Skip to content

Commit ce6d29b

Browse files
committed
๐Ÿ› fix: ์—๋Ÿฌ ๋ฉ”์„ธ์ง€ ์ˆ˜์ •
1 parent 7dfaa8e commit ce6d29b

File tree

1 file changed

+9
-5
lines changed
  • src/app/(crew)/crew/detail/[id]/_components/gathering-detail-modal

1 file changed

+9
-5
lines changed

โ€Žsrc/app/(crew)/crew/detail/[id]/_components/gathering-detail-modal/container.tsxโ€Ž

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,15 @@ export default function GatheringDetailModalContainer({
3535
close();
3636
onUpdate?.();
3737
} catch (error) {
38-
if (error instanceof ApiError && error.status === 401) {
39-
const redirectUrl = `/login?redirect=${encodeURIComponent(window.location.pathname)}`;
40-
router.push(redirectUrl);
41-
} else {
42-
showToast('์ฐธ์—ฌ ์ค‘ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค.', 'error');
38+
if (error instanceof ApiError) {
39+
if (error.status === 401) {
40+
const redirectUrl = `/login?redirect=${encodeURIComponent(window.location.pathname)}`;
41+
router.push(redirectUrl);
42+
} else if (error.status === 404 && error.message === 'ํฌ๋ฃจ ๋ฉค๋ฒ„๊ฐ€ ์•„๋‹™๋‹ˆ๋‹ค.') {
43+
showToast('ํฌ๋ฃจ ๋ฉค๋ฒ„๊ฐ€ ์•„๋‹™๋‹ˆ๋‹ค. ํฌ๋ฃจ๋ฅผ ์ฐธ์—ฌํ•ด๋ณด์„ธ์š”!', 'error');
44+
} else {
45+
showToast('์ฐธ์—ฌ ์ค‘ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค.', 'error');
46+
}
4347
}
4448
}
4549
};

0 commit comments

Comments
ย (0)