Skip to content
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(DOJO): Create main mentor page #2367

Conversation

flacial
Copy link
Member

@flacial flacial commented Sep 29, 2022

Related to #2029

Changes

  • Create the main mentor page under curriculum/[lessonSlug]/mentor which is a literal modified copy of the exercises page including its code and test file.
  • Add another path to the NavBar in the exercises page that link to /curriculum/[lessonSlug]/mentor
  • Move the page for adding an exercise to /mentor/addExercise
Page Image image

Subsequent changes

  1. Create a query to get all the mentor's created exercises based on the user ID
  2. Modify the exercise card to not show ANSWERED or NOT ANSWERED states
  3. Add a back button to the addExercise page

Testing

  1. Go to /curriculum/js0/mentor
  2. Confirm the pages show up correctly
  3. Click MENTOR EXERCISES in the NavBar
  4. Confirm the addExercise page show up correctly

@vercel
Copy link

vercel bot commented Sep 29, 2022

@flacial is attempting to deploy a commit to the c0d3-prod Team on Vercel.

A member of the Team first needs to authorize it.

@@ -0,0 +1,221 @@
import React, { useMemo, useState } from 'react'
Copy link
Member Author

@flacial flacial Sep 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing new. Just moved the file.

@@ -0,0 +1,306 @@
jest.mock('@sentry/nextjs')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing new. Just moved the file.

@codecov
Copy link

codecov bot commented Sep 29, 2022

Codecov Report

Merging #2367 (4dacee1) into master (2be23ab) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #2367   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          183       184    +1     
  Lines         3208      3236   +28     
  Branches       848       856    +8     
=========================================
+ Hits          3208      3236   +28     
Impacted Files Coverage Δ
pages/exercises/[lessonSlug].tsx 100.00% <ø> (ø)
...rriculum/[lessonSlug]/mentor/addExercise/index.tsx 100.00% <100.00%> (ø)
pages/curriculum/[lessonSlug]/mentor/index.tsx 100.00% <100.00%> (ø)

@vercel
Copy link

vercel bot commented Sep 29, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
c0d3-app ✅ Ready (Inspect) Visit Preview Sep 30, 2022 at 3:44PM (UTC)

<ExercisePreviewCard
key={i}
moduleName={exercise.moduleName}
state={'ANSWERED'}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Temporarily set to ANSWERED. Will be fixed in a different PR.

{ text: 'exercises', url: `/exercises/${currentLesson.slug}` },
{
text: 'mentor exercises',
url: `/curriculum/${currentLesson.slug}/mentor/`
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use a single NavBar across the curriculum pages. It'll be done in a different PR.

…of github.com:flacial/c0d3-app into 2029-dojomentorpage-list-mentor-submitted-exercises/1
@flacial flacial added the dont-merge Not ready for merge label Sep 30, 2022
@flacial flacial merged commit 371aae1 into garageScript:master Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dont-merge Not ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants