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:
2026-07-03 02:13:59 +09:00
parent 3656ee9a59
commit 6bf36f34f0
5 changed files with 51 additions and 17 deletions

View File

@@ -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 (