Skip to content

Commit 44fb057

Browse files
committed
[refactor] 필요없는 코드 제거
1 parent 2713a78 commit 44fb057

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/domains/recommend/hook/useChatInit.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,5 @@ export function useChatInit(setMessages: React.Dispatch<React.SetStateAction<Cha
1515
}
1616
};
1717
loadGreeting();
18-
19-
// 새로고침/브라우저 닫기 confirm
20-
const handleBeforeUnload = (e: BeforeUnloadEvent) => {
21-
e.preventDefault();
22-
e.returnValue = '';
23-
};
24-
25-
window.addEventListener('beforeunload', handleBeforeUnload);
26-
27-
return () => {
28-
window.removeEventListener('beforeunload', handleBeforeUnload);
29-
};
3018
}, [setMessages]);
3119
}

0 commit comments

Comments
 (0)