react-native-elearn-ui 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/module/components/Icon.js +97 -0
- package/lib/module/components/Icon.js.map +1 -1
- package/lib/module/screens/HomeScreen.js +22 -9
- package/lib/module/screens/HomeScreen.js.map +1 -1
- package/lib/module/screens/QbankScreen.js +255 -101
- package/lib/module/screens/QbankScreen.js.map +1 -1
- package/lib/module/screens/QuestionScreen.js +222 -181
- package/lib/module/screens/QuestionScreen.js.map +1 -1
- package/lib/module/screens/QuizStartScreen.js +137 -133
- package/lib/module/screens/QuizStartScreen.js.map +1 -1
- package/lib/module/screens/ResultScreen.js +3 -2
- package/lib/module/screens/ResultScreen.js.map +1 -1
- package/lib/module/screens/TopicListScreen.js +287 -137
- package/lib/module/screens/TopicListScreen.js.map +1 -1
- package/lib/typescript/src/components/Icon.d.ts +1 -1
- package/lib/typescript/src/components/Icon.d.ts.map +1 -1
- package/lib/typescript/src/screens/HomeScreen.d.ts +1 -0
- package/lib/typescript/src/screens/HomeScreen.d.ts.map +1 -1
- package/lib/typescript/src/screens/QbankScreen.d.ts +5 -1
- package/lib/typescript/src/screens/QbankScreen.d.ts.map +1 -1
- package/lib/typescript/src/screens/QuestionScreen.d.ts +1 -0
- package/lib/typescript/src/screens/QuestionScreen.d.ts.map +1 -1
- package/lib/typescript/src/screens/QuizStartScreen.d.ts +1 -0
- package/lib/typescript/src/screens/QuizStartScreen.d.ts.map +1 -1
- package/lib/typescript/src/screens/ResultScreen.d.ts +1 -0
- package/lib/typescript/src/screens/ResultScreen.d.ts.map +1 -1
- package/lib/typescript/src/screens/TopicListScreen.d.ts +1 -0
- package/lib/typescript/src/screens/TopicListScreen.d.ts.map +1 -1
- package/lib/typescript/src/types/index.d.ts +22 -0
- package/lib/typescript/src/types/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/Icon.tsx +125 -1
- package/src/screens/HomeScreen.tsx +77 -51
- package/src/screens/QbankScreen.tsx +209 -79
- package/src/screens/QuestionScreen.tsx +185 -178
- package/src/screens/QuizStartScreen.tsx +127 -117
- package/src/screens/ResultScreen.tsx +13 -9
- package/src/screens/TopicListScreen.tsx +271 -116
- package/src/types/index.ts +10 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopicListScreen.d.ts","sourceRoot":"","sources":["../../../../src/screens/TopicListScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"TopicListScreen.d.ts","sourceRoot":"","sources":["../../../../src/screens/TopicListScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AASxC,OAAO,KAAK,EAAE,MAAM,EAAS,MAAM,mBAAU,CAAC;AAK9C,UAAU,oBAAoB;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAuL1D,CAAC"}
|
|
@@ -60,6 +60,10 @@ export interface Topic {
|
|
|
60
60
|
completedQuestions: number;
|
|
61
61
|
progress: number;
|
|
62
62
|
questions?: Question[];
|
|
63
|
+
category?: string;
|
|
64
|
+
rating?: number;
|
|
65
|
+
isFree?: boolean;
|
|
66
|
+
isLocked?: boolean;
|
|
63
67
|
}
|
|
64
68
|
export interface Course {
|
|
65
69
|
id: string;
|
|
@@ -160,5 +164,23 @@ export interface HomeScreenParams {
|
|
|
160
164
|
text: string;
|
|
161
165
|
buttonText: string;
|
|
162
166
|
};
|
|
167
|
+
sectionHeaders?: {
|
|
168
|
+
quickLinks?: {
|
|
169
|
+
title?: string;
|
|
170
|
+
show?: boolean;
|
|
171
|
+
};
|
|
172
|
+
dailyMcq?: {
|
|
173
|
+
title?: string;
|
|
174
|
+
show?: boolean;
|
|
175
|
+
};
|
|
176
|
+
getStarted?: {
|
|
177
|
+
title?: string;
|
|
178
|
+
show?: boolean;
|
|
179
|
+
};
|
|
180
|
+
continueLearning?: {
|
|
181
|
+
title?: string;
|
|
182
|
+
show?: boolean;
|
|
183
|
+
};
|
|
184
|
+
};
|
|
163
185
|
}
|
|
164
186
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAE5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAG5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mBAAmB,CA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AE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,MAAM,CAAC;QACd,kBAAkB,EAAE,MAAM,CAAC;QAC3B,gBAAgB,EAAE,MAAM,CAAC;QACzB,YAAY,EAAE,MAAM,CAAC;QACrB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC,CAAC;IACH,cAAc,CAAC,EAAE;QACf,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,cAAc,CAAC,EAAE;QACf,UAAU,CAAC,EAAE;YAAE,KAAK,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,OAAO,CAAA;SAAE,CAAC;QAChD,QAAQ,CAAC,EAAE;YAAE,KAAK,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,OAAO,CAAA;SAAE,CAAC;QAC9C,UAAU,CAAC,EAAE;YAAE,KAAK,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,OAAO,CAAA;SAAE,CAAC;QAChD,gBAAgB,CAAC,EAAE;YAAE,KAAK,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,OAAO,CAAA;SAAE,CAAC;KACvD,CAAC;CACH"}
|
package/package.json
CHANGED
package/src/components/Icon.tsx
CHANGED
|
@@ -26,7 +26,14 @@ export type IconName =
|
|
|
26
26
|
| 'bookmark'
|
|
27
27
|
| 'file-text'
|
|
28
28
|
| 'download'
|
|
29
|
-
| 'share'
|
|
29
|
+
| 'share'
|
|
30
|
+
| 'lock'
|
|
31
|
+
| 'activity'
|
|
32
|
+
| 'eye'
|
|
33
|
+
| 'clipboard'
|
|
34
|
+
| 'whatsapp'
|
|
35
|
+
| 'alert-circle'
|
|
36
|
+
| 'pause-circle';
|
|
30
37
|
|
|
31
38
|
interface IconProps {
|
|
32
39
|
name: IconName;
|
|
@@ -407,6 +414,123 @@ export const Icon: React.FC<IconProps> = ({
|
|
|
407
414
|
fill="none"
|
|
408
415
|
/>
|
|
409
416
|
);
|
|
417
|
+
case 'lock':
|
|
418
|
+
return (
|
|
419
|
+
<G>
|
|
420
|
+
<Path
|
|
421
|
+
d="M3 11v11a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V11a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2z"
|
|
422
|
+
stroke={iconColor}
|
|
423
|
+
strokeWidth={strokeWidth}
|
|
424
|
+
fill="none"
|
|
425
|
+
/>
|
|
426
|
+
<Path
|
|
427
|
+
d="M7 9V5a5 5 0 0 1 10 0v4"
|
|
428
|
+
stroke={iconColor}
|
|
429
|
+
strokeWidth={strokeWidth}
|
|
430
|
+
fill="none"
|
|
431
|
+
/>
|
|
432
|
+
</G>
|
|
433
|
+
);
|
|
434
|
+
case 'activity':
|
|
435
|
+
return (
|
|
436
|
+
<Path
|
|
437
|
+
d="M22 12h-4l-3 9L9 3l-3 9H2"
|
|
438
|
+
stroke={iconColor}
|
|
439
|
+
strokeWidth={strokeWidth}
|
|
440
|
+
fill="none"
|
|
441
|
+
strokeLinecap="round"
|
|
442
|
+
strokeLinejoin="round"
|
|
443
|
+
/>
|
|
444
|
+
);
|
|
445
|
+
case 'eye':
|
|
446
|
+
return (
|
|
447
|
+
<G>
|
|
448
|
+
<Path
|
|
449
|
+
d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"
|
|
450
|
+
stroke={iconColor}
|
|
451
|
+
strokeWidth={strokeWidth}
|
|
452
|
+
fill="none"
|
|
453
|
+
/>
|
|
454
|
+
<Circle
|
|
455
|
+
cx="12"
|
|
456
|
+
cy="12"
|
|
457
|
+
r="3"
|
|
458
|
+
stroke={iconColor}
|
|
459
|
+
strokeWidth={strokeWidth}
|
|
460
|
+
fill="none"
|
|
461
|
+
/>
|
|
462
|
+
</G>
|
|
463
|
+
);
|
|
464
|
+
case 'clipboard':
|
|
465
|
+
return (
|
|
466
|
+
<G>
|
|
467
|
+
<Path
|
|
468
|
+
d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"
|
|
469
|
+
stroke={iconColor}
|
|
470
|
+
strokeWidth={strokeWidth}
|
|
471
|
+
fill="none"
|
|
472
|
+
/>
|
|
473
|
+
<Path
|
|
474
|
+
d="M8 2h8v4H8z"
|
|
475
|
+
stroke={iconColor}
|
|
476
|
+
strokeWidth={strokeWidth}
|
|
477
|
+
fill="none"
|
|
478
|
+
/>
|
|
479
|
+
</G>
|
|
480
|
+
);
|
|
481
|
+
case 'whatsapp':
|
|
482
|
+
return (
|
|
483
|
+
<Path
|
|
484
|
+
d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"
|
|
485
|
+
stroke={iconColor}
|
|
486
|
+
strokeWidth={strokeWidth}
|
|
487
|
+
fill="none"
|
|
488
|
+
/>
|
|
489
|
+
);
|
|
490
|
+
case 'alert-circle':
|
|
491
|
+
return (
|
|
492
|
+
<G>
|
|
493
|
+
<Circle
|
|
494
|
+
cx="12"
|
|
495
|
+
cy="12"
|
|
496
|
+
r="10"
|
|
497
|
+
stroke={iconColor}
|
|
498
|
+
strokeWidth={strokeWidth}
|
|
499
|
+
fill="none"
|
|
500
|
+
/>
|
|
501
|
+
<Path
|
|
502
|
+
d="M12 8v4"
|
|
503
|
+
stroke={iconColor}
|
|
504
|
+
strokeWidth={strokeWidth}
|
|
505
|
+
strokeLinecap="round"
|
|
506
|
+
/>
|
|
507
|
+
<Circle
|
|
508
|
+
cx="12"
|
|
509
|
+
cy="16"
|
|
510
|
+
r="0.5"
|
|
511
|
+
fill={iconColor}
|
|
512
|
+
/>
|
|
513
|
+
</G>
|
|
514
|
+
);
|
|
515
|
+
case 'pause-circle':
|
|
516
|
+
return (
|
|
517
|
+
<G>
|
|
518
|
+
<Circle
|
|
519
|
+
cx="12"
|
|
520
|
+
cy="12"
|
|
521
|
+
r="10"
|
|
522
|
+
stroke={iconColor}
|
|
523
|
+
strokeWidth={strokeWidth}
|
|
524
|
+
fill="none"
|
|
525
|
+
/>
|
|
526
|
+
<Path
|
|
527
|
+
d="M10 15V9M14 15V9"
|
|
528
|
+
stroke={iconColor}
|
|
529
|
+
strokeWidth={strokeWidth}
|
|
530
|
+
strokeLinecap="round"
|
|
531
|
+
/>
|
|
532
|
+
</G>
|
|
533
|
+
);
|
|
410
534
|
default:
|
|
411
535
|
return null;
|
|
412
536
|
}
|
|
@@ -16,6 +16,7 @@ import type { HomeScreenParams } from '../types';
|
|
|
16
16
|
|
|
17
17
|
interface HomeScreenProps {
|
|
18
18
|
params?: HomeScreenParams;
|
|
19
|
+
hideHeader?: boolean;
|
|
19
20
|
onPressNotification?: () => void;
|
|
20
21
|
onPressAvatar?: () => void;
|
|
21
22
|
onPressTrackQbank?: () => void;
|
|
@@ -30,6 +31,7 @@ interface HomeScreenProps {
|
|
|
30
31
|
|
|
31
32
|
export const HomeScreen: React.FC<HomeScreenProps> = ({
|
|
32
33
|
params,
|
|
34
|
+
hideHeader = false,
|
|
33
35
|
onPressNotification,
|
|
34
36
|
onPressAvatar,
|
|
35
37
|
onPressTrackQbank,
|
|
@@ -73,6 +75,20 @@ export const HomeScreen: React.FC<HomeScreenProps> = ({
|
|
|
73
75
|
}
|
|
74
76
|
];
|
|
75
77
|
|
|
78
|
+
const headersConfig = params?.sectionHeaders || {};
|
|
79
|
+
const getHeaderConfig = (key: 'quickLinks' | 'dailyMcq' | 'getStarted' | 'continueLearning', defaultTitle: string) => {
|
|
80
|
+
const section = headersConfig[key];
|
|
81
|
+
return {
|
|
82
|
+
title: section?.title !== undefined ? section.title : defaultTitle,
|
|
83
|
+
show: section?.show !== undefined ? section.show : true,
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
const quickLinksHeader = getHeaderConfig('quickLinks', 'QUICK LINKS');
|
|
88
|
+
const dailyMcqHeader = getHeaderConfig('dailyMcq', 'BRAIN TEASERS OF THE DAY');
|
|
89
|
+
const getStartedHeader = getHeaderConfig('getStarted', 'GET STARTED');
|
|
90
|
+
const continueLearningHeader = getHeaderConfig('continueLearning', 'CONTINUE LEARNING');
|
|
91
|
+
|
|
76
92
|
const progressData = params?.progress || {
|
|
77
93
|
percentage: 25,
|
|
78
94
|
text: 'Modules Completed of 829',
|
|
@@ -127,43 +143,45 @@ export const HomeScreen: React.FC<HomeScreenProps> = ({
|
|
|
127
143
|
<StatusBar barStyle="dark-content" />
|
|
128
144
|
|
|
129
145
|
{/* Header Panel */}
|
|
130
|
-
|
|
131
|
-
<
|
|
132
|
-
<
|
|
133
|
-
<
|
|
134
|
-
|
|
135
|
-
<View>
|
|
136
|
-
<View style={styles.appNameRow}>
|
|
137
|
-
<Typography variant="h2" bold color={theme.textPrimary}>
|
|
138
|
-
{headerData.appName}
|
|
139
|
-
</Typography>
|
|
140
|
-
<View style={styles.chevronWrap}>
|
|
141
|
-
<Icon name="chevron-left" size={12} color={theme.textSecondary} />
|
|
142
|
-
</View>
|
|
146
|
+
{!hideHeader && (
|
|
147
|
+
<View style={[styles.header, { borderBottomColor: theme.border }]}>
|
|
148
|
+
<TouchableOpacity style={styles.headerDropdown}>
|
|
149
|
+
<View style={[styles.appLogo, { backgroundColor: theme.primary }]}>
|
|
150
|
+
<Typography variant="label" bold color="#FFFFFF">R</Typography>
|
|
143
151
|
</View>
|
|
144
|
-
<
|
|
145
|
-
{
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
</TouchableOpacity>
|
|
149
|
-
|
|
150
|
-
<View style={styles.headerRight}>
|
|
151
|
-
<TouchableOpacity onPress={onPressNotification} style={[styles.iconBtn, { borderColor: theme.border }]}>
|
|
152
|
-
<Icon name="bell" size={20} color={theme.textPrimary} />
|
|
153
|
-
{headerData.notificationCount && headerData.notificationCount > 0 ? (
|
|
154
|
-
<View style={[styles.badge, { backgroundColor: theme.danger }]}>
|
|
155
|
-
<Typography variant="caption" style={styles.badgeText} color="#FFFFFF">
|
|
156
|
-
{headerData.notificationCount}
|
|
152
|
+
<View>
|
|
153
|
+
<View style={styles.appNameRow}>
|
|
154
|
+
<Typography variant="h2" bold color={theme.textPrimary}>
|
|
155
|
+
{headerData.appName}
|
|
157
156
|
</Typography>
|
|
157
|
+
<View style={styles.chevronWrap}>
|
|
158
|
+
<Icon name="chevron-left" size={12} color={theme.textSecondary} />
|
|
159
|
+
</View>
|
|
158
160
|
</View>
|
|
159
|
-
|
|
161
|
+
<Typography variant="caption" color={theme.textSecondary} style={styles.appSubName}>
|
|
162
|
+
{headerData.subName}
|
|
163
|
+
</Typography>
|
|
164
|
+
</View>
|
|
160
165
|
</TouchableOpacity>
|
|
161
166
|
|
|
162
|
-
<
|
|
163
|
-
<
|
|
164
|
-
|
|
167
|
+
<View style={styles.headerRight}>
|
|
168
|
+
<TouchableOpacity onPress={onPressNotification} style={[styles.iconBtn, { borderColor: theme.border }]}>
|
|
169
|
+
<Icon name="bell" size={20} color={theme.textPrimary} />
|
|
170
|
+
{headerData.notificationCount && headerData.notificationCount > 0 ? (
|
|
171
|
+
<View style={[styles.badge, { backgroundColor: theme.danger }]}>
|
|
172
|
+
<Typography variant="caption" style={styles.badgeText} color="#FFFFFF">
|
|
173
|
+
{headerData.notificationCount}
|
|
174
|
+
</Typography>
|
|
175
|
+
</View>
|
|
176
|
+
) : null}
|
|
177
|
+
</TouchableOpacity>
|
|
178
|
+
|
|
179
|
+
<TouchableOpacity onPress={onPressAvatar} style={styles.profileContainer}>
|
|
180
|
+
<Image source={{ uri: headerData.avatarUrl }} style={styles.profileAvatar} />
|
|
181
|
+
</TouchableOpacity>
|
|
182
|
+
</View>
|
|
165
183
|
</View>
|
|
166
|
-
|
|
184
|
+
)}
|
|
167
185
|
|
|
168
186
|
<ScrollView contentContainerStyle={styles.scrollContent} showsVerticalScrollIndicator={false}>
|
|
169
187
|
|
|
@@ -283,11 +301,13 @@ export const HomeScreen: React.FC<HomeScreenProps> = ({
|
|
|
283
301
|
</View>
|
|
284
302
|
|
|
285
303
|
{/* Quick Links Section */}
|
|
286
|
-
|
|
287
|
-
<
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
304
|
+
{quickLinksHeader.show && (
|
|
305
|
+
<View style={styles.sectionHeader}>
|
|
306
|
+
<Typography variant="caption" bold color={theme.textSecondary} style={styles.sectionTitle}>
|
|
307
|
+
{quickLinksHeader.title}
|
|
308
|
+
</Typography>
|
|
309
|
+
</View>
|
|
310
|
+
)}
|
|
291
311
|
|
|
292
312
|
<ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={styles.quickLinksScroll}>
|
|
293
313
|
{quickLinksData.map((link) => (
|
|
@@ -310,11 +330,13 @@ export const HomeScreen: React.FC<HomeScreenProps> = ({
|
|
|
310
330
|
</ScrollView>
|
|
311
331
|
|
|
312
332
|
{/* Brain Teasers Section */}
|
|
313
|
-
|
|
314
|
-
<
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
333
|
+
{dailyMcqHeader.show && (
|
|
334
|
+
<View style={styles.sectionHeader}>
|
|
335
|
+
<Typography variant="caption" bold color={theme.textSecondary} style={styles.sectionTitle}>
|
|
336
|
+
{dailyMcqHeader.title}
|
|
337
|
+
</Typography>
|
|
338
|
+
</View>
|
|
339
|
+
)}
|
|
318
340
|
|
|
319
341
|
<Card bordered style={styles.mcqCard}>
|
|
320
342
|
{dailyMcqData.imageUrl && (
|
|
@@ -379,11 +401,13 @@ export const HomeScreen: React.FC<HomeScreenProps> = ({
|
|
|
379
401
|
</Card>
|
|
380
402
|
|
|
381
403
|
{/* Get Started Section */}
|
|
382
|
-
|
|
383
|
-
<
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
404
|
+
{getStartedHeader.show && (
|
|
405
|
+
<View style={styles.sectionHeader}>
|
|
406
|
+
<Typography variant="caption" bold color={theme.textSecondary} style={styles.sectionTitle}>
|
|
407
|
+
{getStartedHeader.title}
|
|
408
|
+
</Typography>
|
|
409
|
+
</View>
|
|
410
|
+
)}
|
|
387
411
|
|
|
388
412
|
<Card bordered onPress={onPressGetStarted} style={styles.getStartedCard}>
|
|
389
413
|
<View style={styles.getStartedRow}>
|
|
@@ -401,11 +425,13 @@ export const HomeScreen: React.FC<HomeScreenProps> = ({
|
|
|
401
425
|
</Card>
|
|
402
426
|
|
|
403
427
|
{/* Continue Learning Section */}
|
|
404
|
-
|
|
405
|
-
<
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
428
|
+
{continueLearningHeader.show && (
|
|
429
|
+
<View style={styles.sectionHeader}>
|
|
430
|
+
<Typography variant="caption" bold color={theme.textSecondary} style={styles.sectionTitle}>
|
|
431
|
+
{continueLearningHeader.title}
|
|
432
|
+
</Typography>
|
|
433
|
+
</View>
|
|
434
|
+
)}
|
|
409
435
|
|
|
410
436
|
<View style={styles.continueLearningList}>
|
|
411
437
|
{continueLearningData.map((item) => (
|