Skip to content

[6/7] React migration: lazy UserProfile route - #749

Open
devanshi-gpta wants to merge 1 commit into
devin/1788560000-react-05-item-detailsfrom
devin/1788560000-react-06-user
Open

devanshi-gpta wants to merge 1 commit into
devin/1788560000-react-05-item-detailsfrom
devin/1788560000-react-06-user

Conversation

@devanshi-gpta

Copy link
Copy Markdown

Summary

Ports src/app/user/ to components/user/UserProfile.tsx and adds the lazy /user/:id route, mirroring the Angular UserModule lazy load. Fetch/abort and error handling follow the same pattern as Feed.

Worth knowing before reviewing the runtime behavior: the upstream endpoint this view depends on, https://node-hnapi.herokuapp.com/user/:id, no longer exists and responds 404 with an HTML body. That is equally true of the Angular version — the URL is unchanged — so the view renders its error state rather than a profile until the app moves to a different API. The API module rejects on !response.ok, so the failure surfaces as the component's error message instead of a SyntaxError from parsing HTML as JSON.

Proposed fixes

  • Add UserProfile.tsx / UserProfile.scss.
  • Add the lazy /user/:id route to App.

Link to Devin session: https://app.devin.ai/sessions/a3a0ff57bab64e25860349a003a282ef
Open in Devin Desktop: https://app.devin.ai/desktop/session/a3a0ff57bab64e25860349a003a282ef?variant=devin
Requested by: @devanshi-gpta

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