Commit b6c540c4 authored by Krzysztof Kocot's avatar Krzysztof Kocot
Browse files

Fix edit comment showing old content and add draft expiration #767

Fix issue where editing a comment second time showed original content
instead of current version. Also improve localStorage handling:

Changes:
- Fix hydration mismatch with lazy hydration pattern
- Use useMemo for commentBody calculation
- Add useEffect to update text when comment changes in edit mode
- Replace useLocalStorage hook with native localStorage to prevent re-renders
- Add 30-day expiration for comment drafts
- Cleanup expired drafts on component mount
- Ensure Cancel button always removes localStorage data

Closes #767

🤖 Generated with [Claude Code](https://claude.com/claude-code

)

Co-Authored-By: default avatarClaude Opus 4.5 <noreply@anthropic.com>
parent 043aef17
Loading
Loading
Loading
Loading