Skip to content

Commit 9f7c73c

Browse files
authored
Merge pull request #100 from HabibMollah/extracting-state-logic-into-a-reducer
Extracting state logic into a reducer (100% finished)
2 parents a922975 + 86fa226 commit 9f7c73c

File tree

3 files changed

+126
-126
lines changed

3 files changed

+126
-126
lines changed

src/components/MDX/Challenges/Challenge.tsx

+8-10
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export function Challenge({
5050
className="text-xl text-primary dark:text-primary-dark mb-2 mt-0 font-medium"
5151
id={currentChallenge.id}>
5252
<div className="font-bold block md:inline">
53-
{isRecipes ? 'Example' : 'Challenge'} {currentChallenge.order} of{' '}
53+
{isRecipes ? 'উদাহরণ' : 'চ্যালেঞ্জ'} {currentChallenge.order} /{' '}
5454
{totalChallenges}
5555
<span className="text-primary dark:text-primary-dark">: </span>
5656
</div>
@@ -63,14 +63,14 @@ export function Challenge({
6363
<div>
6464
<Button className="me-2" onClick={toggleHint} active={showHint}>
6565
<IconHint className="me-1.5" />{' '}
66-
{showHint ? 'Hide hint' : 'Show hint'}
66+
{showHint ? 'হিন্ট লুকান' : 'হিন্ট দেখুন'}
6767
</Button>
6868
<Button
6969
className="me-2"
7070
onClick={toggleSolution}
7171
active={showSolution}>
7272
<IconSolution className="me-1.5" />{' '}
73-
{showSolution ? 'Hide solution' : 'Show solution'}
73+
{showSolution ? 'সমাধান লুকান' : 'সমাধান দেখুন'}
7474
</Button>
7575
</div>
7676
) : (
@@ -80,7 +80,7 @@ export function Challenge({
8080
onClick={toggleSolution}
8181
active={showSolution}>
8282
<IconSolution className="me-1.5" />{' '}
83-
{showSolution ? 'Hide solution' : 'Show solution'}
83+
{showSolution ? 'সমাধান লুকান' : 'সমাধান দেখুন'}
8484
</Button>
8585
)
8686
)}
@@ -94,7 +94,7 @@ export function Challenge({
9494
)}
9595
onClick={handleClickNextChallenge}
9696
active>
97-
Next {isRecipes ? 'Example' : 'Challenge'}
97+
পরবর্তী {isRecipes ? 'উদাহরণ' : 'চ্যালেঞ্জ'}
9898
<IconArrowSmall displayDirection="end" className="block ms-1.5" />
9999
</Button>
100100
)}
@@ -104,21 +104,19 @@ export function Challenge({
104104
{showSolution && (
105105
<div className="mt-6">
106106
<h3 className="text-2xl font-bold text-primary dark:text-primary-dark">
107-
Solution
107+
সমাধান
108108
</h3>
109109
{currentChallenge.solution}
110110
<div className="flex justify-between items-center mt-4">
111-
<Button onClick={() => setShowSolution(false)}>
112-
Close solution
113-
</Button>
111+
<Button onClick={() => setShowSolution(false)}>সমাধান লুকান</Button>
114112
{hasNextChallenge && (
115113
<Button
116114
className={cn(
117115
isRecipes ? 'bg-purple-50' : 'bg-link dark:bg-link-dark'
118116
)}
119117
onClick={handleClickNextChallenge}
120118
active>
121-
Next Challenge
119+
পরবর্তী চ্যালেঞ্জ
122120
<IconArrowSmall
123121
displayDirection="end"
124122
className="block ms-1.5"

src/components/MDX/Challenges/Challenges.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ export function Challenges({
7878
children,
7979
isRecipes,
8080
noTitle,
81-
titleText = isRecipes ? 'Try out some examples' : 'Try out some challenges',
81+
titleText = isRecipes
82+
? 'কিছু উদাহরণ চর্চা করুন'
83+
: 'কিছু চ্যালেঞ্জ চর্চা করুন',
8284
titleId = isRecipes ? 'examples' : 'challenges',
8385
}: ChallengesProps) {
8486
const challenges = parseChallengeContents(children);

0 commit comments

Comments
 (0)