Skip to content

Convert courseware metadata to React Query #2010

Description

@brian-smith-tcril

Part of #1946 — Redux → React Query migration (Stage 1). Part of the #1976 courseware decomposition (plan) — Target 1 (courseware player). Stacked on the de-class and bridge-extension peels.

Goal: convert the courseware metadata fetch to React Query.

Tasks

  • Convert getCourseMetadata + getLearningSequencesOutline → query hooks feeding coursewareMeta / sections / sequences via the extended bridge.
  • Reuse the existing useCourseHomeMeta for the courseHomeMeta model that fetchCourse currently double-produces — don't re-fetch it.
  • Peel getCoursewareOutlineSidebarToggles aside — it feeds only the outline sidebar; convert it there (the sidebar layer), not here.
  • Move the access-gating decision (courseAccess.hasAccess + outline result → success / denied / failure) into the functional container.
  • Keep the courseware slice status (courseId/courseStatus) written transitionally.

Verify: player renders from the query; useModel readers still served via the bridge; access-denied/redirect behavior unchanged.

Scoped-but-light; a full plan gets added when this is picked up.

Activity

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

Metadata

Metadata

Labels

No labels
No labels

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions