Skip to content

Commit

Permalink
feat: ✨ Translate Challenge component
Browse files Browse the repository at this point in the history
  • Loading branch information
habibium committed Jul 16, 2024
1 parent 826fb5c commit c0f49e3
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/components/MDX/Challenges/Challenge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export function Challenge({
className="text-xl text-primary dark:text-primary-dark mb-2 mt-0 font-medium"
id={currentChallenge.id}>
<div className="font-bold block md:inline">
{isRecipes ? 'Example' : 'Challenge'} {currentChallenge.order} of{' '}
{isRecipes ? 'উদাহরণ' : 'চ্যালেঞ্জ'} {currentChallenge.order} /{' '}
{totalChallenges}
<span className="text-primary dark:text-primary-dark">: </span>
</div>
Expand All @@ -63,14 +63,14 @@ export function Challenge({
<div>
<Button className="me-2" onClick={toggleHint} active={showHint}>
<IconHint className="me-1.5" />{' '}
{showHint ? 'Hide hint' : 'Show hint'}
{showHint ? 'হিন্ট লুকান' : 'হিন্ট দেখুন'}
</Button>
<Button
className="me-2"
onClick={toggleSolution}
active={showSolution}>
<IconSolution className="me-1.5" />{' '}
{showSolution ? 'Hide solution' : 'Show solution'}
{showSolution ? 'সমাধান লুকান' : 'সমাধান দেখুন'}
</Button>
</div>
) : (
Expand All @@ -80,7 +80,7 @@ export function Challenge({
onClick={toggleSolution}
active={showSolution}>
<IconSolution className="me-1.5" />{' '}
{showSolution ? 'Hide solution' : 'Show solution'}
{showSolution ? 'সমাধান লুকান' : 'সমাধান দেখুন'}
</Button>
)
)}
Expand All @@ -94,7 +94,7 @@ export function Challenge({
)}
onClick={handleClickNextChallenge}
active>
Next {isRecipes ? 'Example' : 'Challenge'}
পরবর্তী {isRecipes ? 'উদাহরণ' : 'চ্যালেঞ্জ'}
<IconArrowSmall displayDirection="end" className="block ms-1.5" />
</Button>
)}
Expand All @@ -104,21 +104,19 @@ export function Challenge({
{showSolution && (
<div className="mt-6">
<h3 className="text-2xl font-bold text-primary dark:text-primary-dark">
Solution
সমাধান
</h3>
{currentChallenge.solution}
<div className="flex justify-between items-center mt-4">
<Button onClick={() => setShowSolution(false)}>
Close solution
</Button>
<Button onClick={() => setShowSolution(false)}>সমাধান লুকান</Button>
{hasNextChallenge && (
<Button
className={cn(
isRecipes ? 'bg-purple-50' : 'bg-link dark:bg-link-dark'
)}
onClick={handleClickNextChallenge}
active>
Next Challenge
পরবর্তী চ্যালেঞ্জ
<IconArrowSmall
displayDirection="end"
className="block ms-1.5"
Expand Down

0 comments on commit c0f49e3

Please sign in to comment.