Skip to content

Commit

Permalink
refactor: 등록 성공 후 목록으로 이동
Browse files Browse the repository at this point in the history
  • Loading branch information
WaiNaat committed Sep 15, 2023
1 parent 7a9e487 commit fdcb427
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions frontend/src/hooks/queries/garden/useGardenRegister.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@ const useRegisterPetPlant = () => {

onSuccess: () => {
addToast('success', '게시글 등록에 성공했어요.');
// todo: 목록으로 이동
navigate(URL_PATH.main, { replace: true });
navigate(URL_PATH.garden, { replace: true });
},

onError: () => {
addToast('error', '게시글 등록에 실패했어요.');
},

retry: noRetryIfUnauthorized,
retry: noRetryIfUnauthorized
});
};

Expand Down

0 comments on commit fdcb427

Please sign in to comment.