+
+
+ setShowConfirmUserExit(true)}>
+
+
-
- {/* */}
- {/*
-
-
-
- {countdown_s > 0 ? show_time_left_s : 'times up'}
-
-
Matches:{num_correct}
+
+
+ {countdown_s > 0 ? show_time_left_s : 'times up'}
- */}
-
-
+
Matches:{num_correct}
- >
+
+
+
+
) : (
)}
@@ -210,6 +194,7 @@ function MatchingFrenzyMatchRun() {
}
export default MatchingFrenzyMatchRun;
+
function isEndOfQuestionList(current_question: number, question_list: [] | IMatchingFrenzyQuestion[]) {
return current_question >= question_list.length - 1;
}
diff --git a/002_source/ionic_mobile/src/pages/MatchingFrenzy/formatTimeDisplay.tsx b/002_source/ionic_mobile/src/pages/MatchingFrenzy/formatTimeDisplay.tsx
new file mode 100644
index 0000000..68fe511
--- /dev/null
+++ b/002_source/ionic_mobile/src/pages/MatchingFrenzy/formatTimeDisplay.tsx
@@ -0,0 +1,5 @@
+const formatTimeDisplay = (s: number) => {
+ return `${Math.floor(s / 60)}:${(s % 60).toString().padStart(2, '0')}`;
+};
+
+export default formatTimeDisplay;
diff --git a/002_source/ionic_mobile/src/types/QuizMFQuestion.ts b/002_source/ionic_mobile/src/types/QuizMFQuestion.ts
new file mode 100644
index 0000000..7afb27b
--- /dev/null
+++ b/002_source/ionic_mobile/src/types/QuizMFQuestion.ts
@@ -0,0 +1,19 @@
+export interface QuizMFQuestion {
+ id: string;
+ created: Date;
+ updated: Date;
+ word: string;
+ word_c: string;
+ cat_id: string;
+ visible?: string;
+ sound?: File;
+ cat_image?: File;
+ expand?: {
+ cat_id?: {
+ id: string;
+ cat_name: string;
+ cat_image?: File;
+ };
+ };
+ init_answer: string[];
+}