File tree Expand file tree Collapse file tree 3 files changed +24
-18
lines changed Expand file tree Collapse file tree 3 files changed +24
-18
lines changed Original file line number Diff line number Diff line change 1
- import { CompletedQuizzes , type Lang , QuizShareStats } from "@/lib/types"
1
+ import type {
2
+ CompletedQuizzes ,
3
+ Lang ,
4
+ QuizShareStats ,
5
+ QuizzesSection ,
6
+ } from "@/lib/types"
2
7
3
8
import { getLocaleForNumberFormat } from "@/lib/utils/translations"
4
9
@@ -87,3 +92,9 @@ export const getFormattedStats = (language, average) => {
87
92
) ,
88
93
}
89
94
}
95
+
96
+ export const addNextQuiz = ( quizzes : QuizzesSection [ ] ) =>
97
+ quizzes . map ( ( quiz , idx ) => ( {
98
+ ...quiz ,
99
+ next : quizzes [ idx + 1 ] ?. id ,
100
+ } ) )
Original file line number Diff line number Diff line change 1
1
import type { QuizzesSection , RawQuizzes } from "@/lib/types"
2
2
3
+ import { addNextQuiz } from "@/components/Quiz/utils"
4
+
3
5
// Declare hash-map of quizzes based on slug key
4
6
const quizzes = {
5
7
"what-is-ethereum" : {
@@ -60,78 +62,73 @@ const quizzes = {
60
62
} ,
61
63
} satisfies RawQuizzes
62
64
63
- export const ethereumBasicsQuizzes : QuizzesSection [ ] = [
65
+ const ethereumBasicsQuizzesRaw : QuizzesSection [ ] = [
64
66
{
65
67
id : "what-is-ethereum" ,
66
68
level : "beginner" ,
67
- next : "what-is-ether" ,
68
69
} ,
69
70
{
70
71
id : "what-is-ether" ,
71
72
level : "beginner" ,
72
- next : "wallets" ,
73
73
} ,
74
74
{
75
75
id : "wallets" ,
76
76
level : "beginner" ,
77
- next : "web3" ,
78
77
} ,
79
78
{
80
79
id : "web3" ,
81
80
level : "beginner" ,
82
- next : "security" ,
83
81
} ,
84
82
{
85
83
id : "security" ,
86
84
level : "beginner" ,
87
85
} ,
88
86
]
87
+ export const ethereumBasicsQuizzes : QuizzesSection [ ] = addNextQuiz (
88
+ ethereumBasicsQuizzesRaw
89
+ )
89
90
90
- export const usingEthereumQuizzes : QuizzesSection [ ] = [
91
+ const usingEthereumQuizzesRaw : QuizzesSection [ ] = [
91
92
{
92
93
id : "nfts" ,
93
94
level : "beginner" ,
94
- next : "stablecoins" ,
95
95
} ,
96
96
{
97
97
id : "stablecoins" ,
98
98
level : "beginner" ,
99
- next : "defi" ,
100
99
} ,
101
100
{
102
101
id : "defi" ,
103
102
level : "beginner" ,
104
- next : "layer-2" ,
105
103
} ,
106
104
{
107
105
id : "layer-2" ,
108
106
level : "intermediate" ,
109
- next : "daos" ,
110
107
} ,
111
108
{
112
109
id : "daos" ,
113
110
level : "intermediate" ,
114
- next : "run-a-node" ,
115
111
} ,
116
112
{
117
113
id : "run-a-node" ,
118
114
level : "intermediate" ,
119
- next : "merge" ,
120
115
} ,
121
116
{
122
117
id : "merge" ,
123
118
level : "intermediate" ,
124
- next : "scaling" ,
125
119
} ,
126
120
{
127
121
id : "scaling" ,
128
122
level : "advanced" ,
129
- next : "solo-staking" ,
130
123
} ,
131
124
{
132
125
id : "solo-staking" ,
133
126
level : "advanced" ,
134
127
} ,
135
128
]
136
129
130
+ export const usingEthereumQuizzes : QuizzesSection [ ] = addNextQuiz (
131
+ usingEthereumQuizzesRaw
132
+ )
133
+
137
134
export default quizzes
Original file line number Diff line number Diff line change @@ -1745,9 +1745,7 @@ export const walletsData: WalletData[] = [
1745
1745
open_source : false ,
1746
1746
repo_url : "https://github.com/phantom" ,
1747
1747
non_custodial : true ,
1748
- security_audit : [
1749
- "https://github.com/phantom/audit-reports" ,
1750
- ] ,
1748
+ security_audit : [ "https://github.com/phantom/audit-reports" ] ,
1751
1749
scam_protection : true ,
1752
1750
hardware_support : true ,
1753
1751
rpc_importing : false ,
You can’t perform that action at this time.
0 commit comments