Browse Source
Added condition to hide challenges tab navigation when there is only one challenge (#4044)
main
harish-sethuraman
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
8 additions and
6 deletions
-
beta/src/components/MDX/Challenges/Challenges.tsx
|
|
@ -119,12 +119,14 @@ export function Challenges({children, isRecipes}: ChallengesProps) { |
|
|
|
)}> |
|
|
|
{isRecipes ? 'Try out some recipes' : 'Try out some challenges'} |
|
|
|
</H2> |
|
|
|
<Navigation |
|
|
|
activeChallenge={activeChallenge} |
|
|
|
challenges={challenges} |
|
|
|
handleChange={handleChallengeChange} |
|
|
|
isRecipes={isRecipes} |
|
|
|
/> |
|
|
|
{challenges.length > 1 && ( |
|
|
|
<Navigation |
|
|
|
activeChallenge={activeChallenge} |
|
|
|
challenges={challenges} |
|
|
|
handleChange={handleChallengeChange} |
|
|
|
isRecipes={isRecipes} |
|
|
|
/> |
|
|
|
)} |
|
|
|
</div> |
|
|
|
<div className="p-5 sm:py-8 sm:px-8"> |
|
|
|
<div key={activeChallenge}> |
|
|
|