-
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
Add header and alerts and errors to the DOJO exercises page #2263
Add header and alerts and errors to the DOJO exercises page #2263
Conversation
@bryanjenningz is attempting to deploy a commit to the c0d3-prod Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov Report
@@ Coverage Diff @@
## master #2263 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 177 177
Lines 2980 2990 +10
Branches 797 801 +4
=========================================
+ Hits 2980 2990 +10
|
I like how it handles when the router isn't ready, missing data, and invalid lesson or slug query: if (!router.isReady) return <LoadingSpinner />
const slug = router.query.lessonSlug as string
if (!lessons || !alerts)
return <Error code={StatusCode.INTERNAL_SERVER_ERROR} message="Bad data" />
const currentLesson = lessons.find(lesson => lesson.slug === slug)
if (!currentLesson)
return <Error code={StatusCode.NOT_FOUND} message="Lesson not found" /> I shall consider handling these when working on a page. |
This pull request adds the header to the top of the DOJO exercises page and handles errors and alerts. The header and title will change depending on the exercise you input.
How to test:
This pull request is a part of #2253