Skip to content

Commit

Permalink
#2 Fix: routing시점 문제 router.push(), router.refresh()로 임시해결
Browse files Browse the repository at this point in the history
  • Loading branch information
dongree committed Jul 24, 2023
1 parent 1ad8305 commit 97467b9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/EditorForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,13 @@ export default function EditorForm({
if (!res.ok) {
throw new Error('error');
}
if (isFirst) router.push('/');
else router.push(`/memos/${memoId}`);
if (isFirst) {
router.push('/');
router.refresh();
} else {
router.push(`/memos/${memoId}`);
router.refresh();
}
})
.catch(console.error);
};
Expand Down

0 comments on commit 97467b9

Please sign in to comment.