-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(admin): Create challenges page #2491
feat(admin): Create challenges page #2491
Conversation
@flacial is attempting to deploy a commit to the c0d3-prod Team on Vercel. A member of the Team first needs to authorize it. |
@@ -162,7 +161,12 @@ const ModulesPage = ({ modules, lessonId, refetch }: ModulesPageProps) => { | |||
<div className={styles.container__modulesPanel}> | |||
<AdminLessonSideNav | |||
title="Modules" | |||
items={modules} | |||
items={modules.map(module => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AdminLessonSideNav
takes a specific object. For it to work, we're passing what it expects.
fetchPolicy: 'no-cache' | ||
}) | ||
|
||
const { data: modulesData, refetch: refetchModules } = useModulesQuery({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To reduce the number of queries sent, we can only send a request to get x query (e.g, modules) when the user goes to its page. Let me know what you think.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov Report
@@ Coverage Diff @@
## master #2491 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 186 186
Lines 3324 3348 +24
Branches 883 889 +6
=========================================
+ Hits 3324 3348 +24
|
Related to #2081
Description
This PR aims at adding the page that'll be used to create and edit the challenges.
Page image
Testing
/admin/lessons/js0/challenges
SAVE CHANGES
→ Make sure it got updated correctlyADD NEW MODULE
at the bottom of the sidebarorder
as 0 → Make sure it appears as the first item in the sidebarIssues
The sidebar text should be
ADD NEW CHALLENGE
&NO CHALLENGES
instead of modules. This will be fixed in a subsequent PR.