Skip to content

feat: replace hardcoded courses with real API, search, filters, and pagination - #344

Open
Xaxxoo wants to merge 3 commits into
WeAcademy:mainfrom
Xaxxoo:feat/course-search-browse-ui
Open

Xaxxoo wants to merge 3 commits into
WeAcademy:mainfrom
Xaxxoo:feat/course-search-browse-ui

Conversation

@Xaxxoo

@Xaxxoo Xaxxoo commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Remove hardcoded course data, fetch from GET /api/v1/courses via TanStack Query useInfiniteQuery
  • Add debounced search input with 300ms delay (custom useDebounce hook)
  • Add difficulty filter pills (All/Beginner/Intermediate/Advanced)
  • Add tag filter chips populated from GET /api/v1/courses/tags (multi-select)
  • Add sort selector (Newest/Most Popular/A-Z)
  • Add Load More pagination with useInfiniteQuery (appends next page without replacing current list)
  • Add loading skeletons via CourseGridSkeleton component
  • Add empty state with SearchX icon and Clear filters button when no courses match
  • Update CourseCard to show enrollmentCount and isEnrolled badge for authenticated users
  • Update CourseCard button to show Continue Learning/Enroll Now/Sign in to enroll

Test plan

  • Page loads and shows real courses from the backend
  • Search filters results after 300ms debounce
  • Difficulty pills filter correctly
  • Tag chips filter correctly with multi-select
  • Sort selector works
  • Load More appends next page without replacing current list
  • Empty state appears when no results match filters
  • Authenticated users see enrollment badges
  • Loading skeletons display while fetching

Closes #221

Generated with Claude Code

Xaxxoo and others added 3 commits August 31, 2026 12:08
…g, and pagination UI

- Remove hardcoded course data from courses page
- Fetch courses from GET /api/v1/courses via TanStack useInfiniteQuery
- Add useDebounce hook (300ms) for search input
- Add useCourses hook with pagination, search, difficulty, tags, and sort params
- Add useCourseTags hook to fetch available tags from GET /api/v1/courses/tags
- Add CourseFilters component with search input, difficulty pills, tag chips, sort selector
- Add CourseGridSkeleton loading component
- Add Load More button for pagination via useInfiniteQuery
- Add empty state with Clear filters button when no courses match
- Update CourseCard to show enrollmentCount and isEnrolled badge for authenticated users
- Update CourseCard button text: Continue Learning / Enroll Now / Sign in to enroll

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…issue

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… push

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

Build Course Browse Page — Real API Data, Search, Difficulty Filter, Tag Chips, and Pagination

1 participant