Skip to content

Commit 52206b6

Browse files
chore(QuizzesList.stories): simplify heading and descript id args
1 parent 81a788a commit 52206b6

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

src/components/Quiz/stories/QuizzesList.stories.tsx

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ const meta = {
2020
component: QuizzesListComponent,
2121
args: {
2222
content: ethereumBasicsQuizzes,
23-
headingId: "basics",
24-
descriptionId: "basics-description",
23+
headingId: getTranslation("basics", "learn-quizzes"),
24+
descriptionId: getTranslation("basics-description", "learn-quizzes"),
2525
userStats: {
2626
score: 0,
2727
average: [],
@@ -35,13 +35,7 @@ const meta = {
3535
export default meta
3636

3737
export const Default: StoryObj<typeof meta> = {
38-
render: ({ headingId, descriptionId, ...args }) => (
39-
<QuizzesListComponent
40-
{...args}
41-
headingId={getTranslation(headingId, "learn-quizzes")}
42-
descriptionId={getTranslation(descriptionId, "learn-quizzes")}
43-
/>
44-
),
38+
render: (args) => <QuizzesListComponent {...args} />,
4539
}
4640

4741
export const OneCompletedQuiz: StoryObj<typeof meta> = {
@@ -56,11 +50,5 @@ export const OneCompletedQuiz: StoryObj<typeof meta> = {
5650
},
5751
},
5852
},
59-
render: ({ headingId, descriptionId, ...args }) => (
60-
<QuizzesListComponent
61-
{...args}
62-
headingId={getTranslation(headingId, "learn-quizzes")}
63-
descriptionId={getTranslation(descriptionId, "learn-quizzes")}
64-
/>
65-
),
53+
render: (args) => <QuizzesListComponent {...args} />,
6654
}

0 commit comments

Comments
 (0)