Skip to content

feat(courses): move course data fetching to server component - #1096

Merged
RUKAYAT-CODER merged 2 commits into
rinafcode:mainfrom
xtrial01:feat/course-server-side-fetching
Jul 30, 2026
Merged

feat(courses): move course data fetching to server component#1096
RUKAYAT-CODER merged 2 commits into
rinafcode:mainfrom
xtrial01:feat/course-server-side-fetching

Conversation

@xtrial01

Copy link
Copy Markdown

Description

Moves course data fetching from client-side to the server component for /courses/[courseId]. getCourseById() now runs server-side in page.tsx and the resolved course is passed down as a prop to CoursePageContent and CourseHero, removing the need for client-side fetching/loading state in those components. Also added notFound() handling for invalid course IDs, wired real course data into generateMetadata for SEO, and replaced the generic loading skeleton with a detailed one matching the actual page layout (hero, progress, video preview, syllabus, reviews, instructor, enrollment CTA).

Related Issue

Closes #928

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • No console errors
  • Uses Lucide icons consistently
  • Responsive design implemented
  • Starknet best practices followed

- Fetch course data server-side in [courseId]/page.tsx via getCourseById()
- Pass course data down to CoursePageContent as a prop
- Add notFound() handling for invalid course IDs
- Update generateMetadata to use real course data for SEO
- Update CourseHero to accept course prop
- Add detailed loading skeleton matching actual page layout
@drips-wave

drips-wave Bot commented Jul 30, 2026

Copy link
Copy Markdown

@xtrial01 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

well done on the job done so far!
Kindly fix workflow to pass

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Thank you for contributing to the project.

@RUKAYAT-CODER
RUKAYAT-CODER merged commit 013f198 into rinafcode:main Jul 30, 2026
6 checks passed
@xtrial01

Copy link
Copy Markdown
Author

Glad to contribute more in the future

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.

Move courses/[courseId] data fetching into the server component with a loading boundary

2 participants