mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-23 20:23:08 +00:00
Added condition to hide challenges tab navigation when there is only one challenge (#4044)
This commit is contained in:
committed by
GitHub
parent
7451b15015
commit
91e42cb59a
@@ -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}>
|
||||
|
||||
Reference in New Issue
Block a user