Skip to content

PR 4/6: React Migration — Page Components & Routing#45

Open
devanshi-gpta wants to merge 1 commit into
react-migration/shared-and-layoutfrom
react-migration/pages-and-routing
Open

PR 4/6: React Migration — Page Components & Routing#45
devanshi-gpta wants to merge 1 commit into
react-migration/shared-and-layoutfrom
react-migration/pages-and-routing

Conversation

@devanshi-gpta

@devanshi-gpta devanshi-gpta commented Jun 24, 2026

Copy link
Copy Markdown

Summary

Fourth PR in the 6-part Angular→React migration. Adds all page components and wires up the full React Router v6 app shell with lazy-loaded routes.

Pages:

  • Home — feed toggle (global/following), tag filtering via /tag/:tag, pagination via ?page=N, popular tags sidebar
  • Auth — unified login (/login) and register (/register) with shared form, validation, and ListErrors
  • Settings — profile update form (image, username, bio, email, password), logout button
  • Editor — create (/editor) and edit (/editor/:slug) articles with tag pill management via Enter key
  • Article — full article view with dangerouslySetInnerHTML for markdown body, comments CRUD, favorite/follow toggles, conditional edit/delete for author
  • Profile — user profile with "My Posts" / "Favorited Posts" tabs via NavLink, follow button for non-self profiles

App shell (App.tsx):

<BrowserRouter>
  <AuthProvider>
    <Header />
    <Suspense fallback={<Loader />}>
      <Routes>  // all pages lazy-loaded via React.lazy()
    </Suspense>
    <Footer />
  </AuthProvider>
</BrowserRouter>

All pages use default exports for React.lazy() code splitting. Vite build produces separate chunks per page.

Link to Devin session: https://app.devin.ai/sessions/6215127f80d4463cad3055cf81b87f0c
Requested by: @devanshi-gpta


Devin Review

Status Commit
⚪ Not started

Run Devin Review

Open in Devin Review (Staging)

- Home page: global/following feed toggle, tag filtering, pagination, popular tags sidebar
- Auth page: login/register with form validation and error display
- Settings page: profile settings form with logout
- Editor page: create/edit articles with tag management
- Article page: article detail with markdown rendering, comments, favorite/follow, delete
- Profile page: user profile with articles/favorites tabs
- App.tsx: full BrowserRouter shell with lazy-loaded routes via React.lazy + Suspense
- All routes: /, /tag/:tag, /login, /register, /settings, /editor, /editor/:slug, /article/:slug, /profile/:username, /profile/:username/favorites

Co-Authored-By: Devanshi Gupta <devanshi.gupta@cognition.ai>
@devin-ai-integration

Copy link
Copy Markdown

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant