Commit Graph

3 Commits

Author SHA1 Message Date
Gigi
7cf2b7d35d fix: remove redundant setReaderLoading call in error handler 2025-10-05 22:39:51 +01:00
Gigi
fa52d61c20 fix(highlights): prevent highlights panel from auto-opening on article load 2025-10-05 22:28:07 +01:00
Gigi
4d95657bca refactor: keep Bookmarks.tsx under 210 lines by extracting logic
Extracted large functions into separate modules to follow DRY principles
and keep files manageable:

- Created useArticleLoader.ts hook (92 lines)
  - Handles article loading from naddr
  - Fetches article content and highlights
  - Sets up article coordinate for refresh

- Created contentLoader.ts utility (44 lines)
  - Handles both Nostr articles and web URLs
  - Unified content loading logic
  - Reusable across components

Result: Bookmarks.tsx reduced from 282 to 208 lines 

All files now under 210 line limit while maintaining functionality.
2025-10-05 12:47:32 +01:00