Added condition to hide challenges tab navigation when there is only one challenge (#4044)

This commit is contained in:
harish-sethuraman
2021-11-05 23:43:15 +05:30
committed by GitHub
parent 7451b15015
commit 91e42cb59a

View File

@@ -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}>