Improve data reset flow
The settings page was reloading slowly after a data reset. This commit addresses the issue by preventing the unnecessary reload after the reset operation.
This commit is contained in:
@@ -18,16 +18,8 @@ const DataResetSection = () => {
|
||||
await resetAllData();
|
||||
setIsResetDialogOpen(false);
|
||||
|
||||
// 알림 표시
|
||||
toast({
|
||||
title: "데이터 초기화 완료",
|
||||
description: "모든 데이터가 초기화되었습니다.",
|
||||
});
|
||||
|
||||
// 초기화 후 페이지 새로고침
|
||||
setTimeout(() => {
|
||||
window.location.reload();
|
||||
}, 1000);
|
||||
// toast 알림은 useDataReset.ts에서 처리하므로 여기서는 제거
|
||||
// 페이지 새로고침 코드 제거 (navigate 사용으로 대체)
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user