fix(stock): watchlist 렌더 크래시 가드·성공 시 폼 리셋·정렬 테스트
- watchlistUtils: Object.hasOwn 가드 + Object.freeze (프로토타입 키 → 함수 반환 방지) - useWatchlist.add: boolean 반환 + 재진입 가드; 성공 시에만 폼 리셋 - byFiredAtDesc 멀티 알림 정렬 테스트 추가 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UHXzpsZQxKG9hQmNRfZjRS
This commit is contained in:
@@ -34,8 +34,8 @@ const WatchlistTab = ({ wl }) => {
|
||||
const submit = async (e) => {
|
||||
e.preventDefault();
|
||||
if (!form.ticker.trim()) return;
|
||||
await wl.add(form);
|
||||
setForm({ ticker: '', name: '', note: '' });
|
||||
const ok = await wl.add(form);
|
||||
if (ok) setForm({ ticker: '', name: '', note: '' });
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user