3.26 Migrate UserPosts Components
Summary
Migrate all user-post listing components from src-old/components/UserPosts/ into components/UserPosts/. Replace Material UI UI elements with shadcn/ui and Tailwind, convert JSX to TSX, update per-user post data fetching with Apollo Client, and validate that user-specific post lists render correctly.
Tasks
Expected Behavior
UserPosts components render all posts authored by a specific user with updated styling, typed props, and reliable GraphQL-backed data fetching.
Tech Notes
- Mark components with
"use client" where they handle local state (filters, pagination, etc.).
- Coordinate post card layout and behavior with the migrated Post components.
- Ensure loading and error states follow the new Alert/LoadingSpinner patterns.
Acceptance Criteria
- All user-post listing components exist under
components/UserPosts/ in TypeScript
- No MUI imports remain in user-post code
- User-specific posts load correctly via GraphQL
- TypeScript checks and builds pass without errors
- UserPosts lists integrate cleanly with Profile pages
Test Instructions
- Create
app/test/user-posts/page.tsx that renders user post lists for a given user ID.
- Verify that posts display correctly, including count, ordering, and metadata.
- Test empty-state behavior when a user has no posts.
- Run
npm run dev and npm run build to confirm stable behavior.
Labels
frontend migration typescript components posts profile phase3
3.26 Migrate UserPosts Components
Summary
Migrate all user-post listing components from
src-old/components/UserPosts/intocomponents/UserPosts/. Replace Material UI UI elements with shadcn/ui and Tailwind, convert JSX to TSX, update per-user post data fetching with Apollo Client, and validate that user-specific post lists render correctly.Tasks
components/UserPosts/if missingsrc-old/components/UserPosts/*.jsx→.tsx@/components/UserPostssrc-oldExpected Behavior
UserPosts components render all posts authored by a specific user with updated styling, typed props, and reliable GraphQL-backed data fetching.
Tech Notes
"use client"where they handle local state (filters, pagination, etc.).Acceptance Criteria
components/UserPosts/in TypeScriptTest Instructions
app/test/user-posts/page.tsxthat renders user post lists for a given user ID.npm run devandnpm run buildto confirm stable behavior.Labels
frontendmigrationtypescriptcomponentspostsprofilephase3