Skip to content

Commit

Permalink
#72 fix: 대시보드 삭제 및 탈퇴시 튜토리얼 페이지로 이동
Browse files Browse the repository at this point in the history
  • Loading branch information
MyungJiwoo committed Sep 23, 2024
1 parent d71582f commit 06ef924
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/hooks/usePersonalDashBoard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ const usePersonalDashBoard = (dashboardId: string | null) => {
const deleteDashboard = async () => {
if (dashboardId) {
await deletePersonalDashboard(dashboardId);
navigate('/');
navigate(`/tutorial`);
localStorage.removeItem('LatestBoard');
}
};

Expand Down
6 changes: 4 additions & 2 deletions src/pages/CreateTeamBoardPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ const CreateTeamBoard = () => {
const deleteDashboard = async () => {
if (dashboardId) {
await deleteTeamDashboard(dashboardId);
navigate('/');
navigate(`/tutorial`);
localStorage.removeItem('LatestBoard');
}
};

Expand All @@ -146,7 +147,8 @@ const CreateTeamBoard = () => {
const quitDashboard = async () => {
if (dashboardId) {
await quitTeamDashboard(dashboardId);
navigate('/');
navigate(`/tutorial`);
localStorage.removeItem('LatestBoard');
}
};

Expand Down

0 comments on commit 06ef924

Please sign in to comment.