Skip to content

Refactor: decompose Press.tsx (1,162 lines) #7

Description

@satsdisco

Summary

Press.tsx at 1,162 lines is the largest component and handles too many concerns:

  • Editorial feed rendering
  • Curated author management (NIP-51 curation lists)
  • Social graph / follow feed
  • Bookmarks
  • Relay management for Press
  • Article cards / list rendering
  • Profile fetching and display

Proposed Decomposition

  • Press.tsx — Layout shell, tab switching
  • ArticleCard.tsx — Individual article card component
  • EditorialFeed.tsx — Curated/editorial content
  • SocialFeed.tsx — Follow-based feed
  • PressRelayManager.tsx — Relay config for the Press view
  • Move relay persistence helpers to lib/relayStorage.ts

Acceptance Criteria

  • No component exceeds ~300 lines
  • Same visual output and behavior
  • Shared components are reusable
  • ESLint passes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions