Skip to content

Commit 7c9af69

Browse files
authored
Merge pull request #14148 from ethereum/rename-quiz-keys
refactor: rename quiz keys, use unique namespace
2 parents 0b8b4cf + 236acdb commit 7c9af69

27 files changed

+10458
-10434
lines changed

src/components/Quiz/stories/QuizButtonGroup.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const NoSelectedAnswer: Story = {}
4242

4343
export const SelectedAnswer: Story = {
4444
args: {
45-
currentQuestionAnswerChoice: { answerId: "g001-a", isCorrect: true },
45+
currentQuestionAnswerChoice: { answerId: "rollups-1-a", isCorrect: true },
4646
},
4747
}
4848

src/components/Quiz/stories/QuizRadioGroup.stories.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const StartQuestion: Story = {
3232
}
3333

3434
const clickAnswer = async (
35-
selectedId: `g001-${string}`,
35+
selectedId: `rollups-1-${string}`,
3636
answers: HTMLElement[]
3737
) => {
3838
const selectedAnswer = answers.find((answer) => answer.id === selectedId)
@@ -50,7 +50,7 @@ export const SelectedAnswer: Story = {
5050
const answers = canvas.getAllByTestId("quiz-question-answer")
5151

5252
// Click the first answer ("which is the correct answer")
53-
await clickAnswer("g001-a", answers)
53+
await clickAnswer("rollups-1-a", answers)
5454
},
5555
}
5656

@@ -73,6 +73,6 @@ export const SelectedIncorrectAnswer: Story = {
7373
const answers = canvas.getAllByTestId("quiz-question-answer")
7474

7575
// Click the second answer ("which is the incorrect answer")
76-
await clickAnswer("g001-b", answers)
76+
await clickAnswer("rollups-1-b", answers)
7777
},
7878
}

src/data/placeholders/content-energy-consumption-data.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
},
1818
"/content/translations/fa/energy-consumption/energy_consumption_pre_post_merge.png": {
1919
"hash": "db7c5eb2",
20-
"base64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAJCAYAAAA7Kq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mEWq1WmAHT6WSsVjOUVCorUegJ5vbXAbRBLwhujKtkuaR9G/q5hhibYEN0h8qBMB6PH4uiGIQPnAfThlMpFyt3t3q23byuYpBsVQCiG0hiMVs7cQ+YOF3XBWxF11UBLbJH6gc1TYsqirLn5j2ukV/Nf+duuMjn8gAAAABJRU5ErkJggg=="
2121
},
2222
"/content/translations/fr/energy-consumption/energy_consumption_pre_post_merge.png": {
2323
"hash": "9bc283e5",

src/data/quizzes/index.ts

Lines changed: 47 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,59 +6,92 @@ import { addNextQuiz } from "@/components/Quiz/utils"
66
const quizzes = {
77
"what-is-ethereum": {
88
title: "what-is-ethereum",
9-
questions: ["a001", "a002", "a003", "a004", "a005"],
9+
questions: [
10+
"ethereum-1",
11+
"ethereum-2",
12+
"ethereum-3",
13+
"ethereum-4",
14+
"ethereum-5",
15+
],
1016
},
1117
"what-is-ether": {
1218
title: "what-is-ether",
13-
questions: ["b001", "b002", "b003", "b004"],
19+
questions: ["ether-1", "ether-2", "ether-3", "ether-4"],
1420
},
1521
web3: {
1622
title: "web3",
17-
questions: ["c001", "c002", "c003", "c004", "c005"],
23+
questions: ["web3-1", "web3-2", "web3-3", "web3-4", "web3-5"],
1824
},
1925
wallets: {
2026
title: "wallets",
21-
questions: ["d001", "d002", "d003", "d004"],
27+
questions: ["wallets-1", "wallets-2", "wallets-3", "wallets-4"],
2228
},
2329
security: {
2430
title: "ethereum-security",
25-
questions: ["e001", "e002", "e003", "e004", "d003"],
31+
questions: [
32+
"security-1",
33+
"security-2",
34+
"security-3",
35+
"security-4",
36+
"wallets-3",
37+
],
2638
},
2739
nfts: {
2840
title: "nft-page",
29-
questions: ["f001", "f002", "f003", "f004", "f005"],
41+
questions: ["nfts-1", "nfts-2", "nfts-3", "nfts-4", "nfts-5"],
3042
},
3143
"layer-2": {
3244
title: "layer-2",
33-
questions: ["g001", "g002", "g003", "g004"],
45+
questions: ["rollups-1", "rollups-2", "rollups-3", "rollups-4"],
3446
},
3547
merge: {
3648
title: "learn-quizzes:page-assets-merge",
37-
questions: ["h001", "h002", "h003", "h004", "h005"],
49+
questions: ["merge-1", "merge-2", "merge-3", "merge-4", "merge-5"],
3850
},
3951
daos: {
4052
title: "DAOs",
41-
questions: ["i001", "i002", "i003", "i004", "i005"],
53+
questions: ["daos-1", "daos-2", "daos-3", "daos-4", "daos-5"],
4254
},
4355
"solo-staking": {
4456
title: "solo",
45-
questions: ["j001", "j002", "j004", "j005", "j006", "j007", "j008"],
57+
questions: [
58+
"staking-1",
59+
"staking-2",
60+
"staking-4",
61+
"staking-5",
62+
"staking-6",
63+
"staking-7",
64+
"staking-8",
65+
],
4666
},
4767
scaling: {
4868
title: "scaling",
49-
questions: ["k001", "k002", "k003", "k004"],
69+
questions: ["scaling-1", "scaling-2", "scaling-3", "scaling-4"],
5070
},
5171
"run-a-node": {
5272
title: "run-a-node",
53-
questions: ["l001", "l002", "l003", "l004", "l005", "l006"],
73+
questions: [
74+
"run-a-node-1",
75+
"run-a-node-2",
76+
"run-a-node-3",
77+
"run-a-node-4",
78+
"run-a-node-5",
79+
"run-a-node-6",
80+
],
5481
},
5582
stablecoins: {
5683
title: "stablecoins",
57-
questions: ["m001", "m002", "m003", "m004", "m005"],
84+
questions: [
85+
"stablecoins-1",
86+
"stablecoins-2",
87+
"stablecoins-3",
88+
"stablecoins-4",
89+
"stablecoins-5",
90+
],
5891
},
5992
defi: {
6093
title: "DeFi",
61-
questions: ["n001", "n002", "n003", "n004", "n005"],
94+
questions: ["defi-1", "defi-2", "defi-3", "defi-4", "defi-5"],
6295
},
6396
} satisfies RawQuizzes
6497

0 commit comments

Comments
 (0)