diff --git a/frontend/iQMA-Skills-Builder/app/Assessment.tsx b/frontend/iQMA-Skills-Builder/app/Assessment.tsx index 63fccce..a83531d 100644 --- a/frontend/iQMA-Skills-Builder/app/Assessment.tsx +++ b/frontend/iQMA-Skills-Builder/app/Assessment.tsx @@ -12,7 +12,7 @@ import * as unitEndpoints from '@/helpers/unitEndpoints'; import * as assessmentEndpoints from '@/helpers/assessmentEndpoints'; import {formatUnit} from '@/helpers/formatUnitID'; import {formatSection} from '@/helpers/formatSectionID'; -import { OverviewCard } from '@/components/OverviewCard'; +import {OverviewCard} from '@/components/OverviewCard'; import {LoadingIndicator} from '@/components/LoadingIndicator'; export default function Assessment() { @@ -24,7 +24,7 @@ export default function Assessment() { const [unitName, setUnitName] = useState(''); const [unitScenario, setUnitScenario] = useState(''); const [isLoading, setIsLoading] = useState(true); - + // Hardcoded for now until routing confirmed // const sectionID = 'SEC0001'; // const unitID = 'UNIT0001'; @@ -50,9 +50,8 @@ export default function Assessment() { setSectionNumber(formatSection(sectionID as string)); setUnitNumber(formatUnit(unitID as string)); - } catch (error) { - console.error("Error fetching unit details", error); + console.error('Error fetching unit details', error); } finally { setIsLoading(false); } @@ -85,7 +84,7 @@ export default function Assessment() { > {isLoading ? ( - ): ( + ) : ( <> - Choose the most appropriate option for each question. + Choose the most appropriate option for each + question. diff --git a/frontend/iQMA-Skills-Builder/app/CheatSheet.tsx b/frontend/iQMA-Skills-Builder/app/CheatSheet.tsx index 078cef3..ee20829 100644 --- a/frontend/iQMA-Skills-Builder/app/CheatSheet.tsx +++ b/frontend/iQMA-Skills-Builder/app/CheatSheet.tsx @@ -6,7 +6,7 @@ import {useNavigation} from '@react-navigation/native'; import ProgressBar from '@/components/ProgressBar'; import {OverviewCard} from '@/components/OverviewCard'; import * as lessonEndpoints from '@/helpers/lessonEndpoints'; -import { formatUnit } from '@/helpers/formatUnitID'; +import {formatUnit} from '@/helpers/formatUnitID'; import {LoadingIndicator} from '@/components/LoadingIndicator'; const formatCheatSheet = (cheatsheet: any) => { @@ -68,7 +68,9 @@ export default function CheatSheet() { ); const processedLessonDetails = lessonDetails - .filter((lesson: any) => !lesson.lessonID.includes('.2')) + .filter( + (lesson: any) => !lesson.lessonID.includes('.2') + ) .map((lesson: any) => ({ ...lesson, lessonName: lesson.lessonName.replace('.1', ''), @@ -77,11 +79,14 @@ export default function CheatSheet() { setLessons(processedLessonDetails); setUnitNumber(formatUnit(unitID as string)); } catch (error) { - console.error('Error fetching Lesson details in CheatSheet:', error); + console.error( + 'Error fetching Lesson details in CheatSheet:', + error + ); } finally { setIsLoading(false); - } - })(); + } + })(); } }, [sectionID, unitID]); diff --git a/frontend/iQMA-Skills-Builder/app/KeyTakeaway.tsx b/frontend/iQMA-Skills-Builder/app/KeyTakeaway.tsx index d171539..1d4bb15 100644 --- a/frontend/iQMA-Skills-Builder/app/KeyTakeaway.tsx +++ b/frontend/iQMA-Skills-Builder/app/KeyTakeaway.tsx @@ -52,11 +52,12 @@ export default function KeyTakeaway() { unitID as string ); - const lessonDetails = await lessonEndpoints.getLessonDetails( - sectionID as string, - unitID as string, - lessonID as string - ); + const lessonDetails = + await lessonEndpoints.getLessonDetails( + sectionID as string, + unitID as string, + lessonID as string + ); setLessonName(lessonDetails.lessonName); setUnitName(unitDetails.unitName); @@ -86,21 +87,19 @@ export default function KeyTakeaway() { title={`SECTION ${sectionNumber}, UNIT ${unitNumber}`} subtitle={unitName} /> - - {lessonName} - + {lessonName} Key Takeaways {keyTakeaway && keyTakeaway.length > 0 ? ( - keyTakeaway.map((takeaway: string, index: number) => ( - - - {index + 1}. {takeaway} - - - )) + keyTakeaway.map( + (takeaway: string, index: number) => ( + + + {index + 1}. {takeaway} + + + ) + ) ) : ( - + )} diff --git a/frontend/iQMA-Skills-Builder/app/Lesson.tsx b/frontend/iQMA-Skills-Builder/app/Lesson.tsx index 97d80cf..fd7a467 100644 --- a/frontend/iQMA-Skills-Builder/app/Lesson.tsx +++ b/frontend/iQMA-Skills-Builder/app/Lesson.tsx @@ -99,11 +99,7 @@ export default function Lesson() { title={`SECTION ${sectionNumber}, UNIT ${unitNumber}`} subtitle={unitName} /> - - {lessonName} - + {lessonName} {lessonDescription ? ( (''); const [unitNumber, setUnitNumber] = useState(''); const [unitName, setUnitName] = useState(''); - const [realityCheckDescription, setRealityCheckDescription] = useState([]); + const [realityCheckDescription, setRealityCheckDescription] = useState< + string[] + >([]); const [isLoading, setIsLoading] = useState(true); // Only for testing, please delete - const [sectionID, setSectionID] = useState("SEC0001") - const [unitID, setUnitID] = useState("UNIT0001") + const [sectionID, setSectionID] = useState('SEC0001'); + const [unitID, setUnitID] = useState('UNIT0001'); - useEffect(() => { - }, []); + useEffect(() => {}, []); useLayoutEffect(() => { navigation.setOptions({ @@ -51,17 +52,18 @@ export default function RealityCheck() { setSectionNumber(formatSection(sectionID as string)); setUnitNumber(formatUnit(unitID as string)); } catch (error) { - console.error('Error fetching Unit details in Reality Check:', error); + console.error( + 'Error fetching Unit details in Reality Check:', + error + ); } finally { setIsLoading(false); } })(); - } }, [sectionID, unitID]); const handlePress = async () => { - router.push({ pathname: 'Assessment', params: {sectionID: sectionID, unitID: unitID}, @@ -70,7 +72,6 @@ export default function RealityCheck() { return ( - {isLoading ? ( ) : ( @@ -85,9 +86,14 @@ export default function RealityCheck() { {realityCheckDescription.length > 0 ? ( - realityCheckDescription.map((description, index) => ( - - )) + realityCheckDescription.map( + (description, index) => ( + + ) + ) ) : ( )} - + + /> )} diff --git a/frontend/iQMA-Skills-Builder/app/SectionIntroduction.tsx b/frontend/iQMA-Skills-Builder/app/SectionIntroduction.tsx index 5193c59..c6d3826 100644 --- a/frontend/iQMA-Skills-Builder/app/SectionIntroduction.tsx +++ b/frontend/iQMA-Skills-Builder/app/SectionIntroduction.tsx @@ -9,7 +9,7 @@ import ProgressBar from '@/components/ProgressBar'; import {formatSection} from '@/helpers/formatSectionID'; import {OverviewCard} from '@/components/OverviewCard'; import * as sectionEndpoints from '@/helpers/sectionEndpoints'; -import { LoadingIndicator } from '@/components/LoadingIndicator'; +import {LoadingIndicator} from '@/components/LoadingIndicator'; // where things show up export default function SectionIntroduction() { @@ -86,9 +86,7 @@ export default function SectionIntroduction() { title={`SECTION ${sectionNumber}`} subtitle={sectionName} /> - + Section {sectionNumber}: Introduction {videoId ? ( diff --git a/frontend/iQMA-Skills-Builder/app/SelfReflection.tsx b/frontend/iQMA-Skills-Builder/app/SelfReflection.tsx index b3a748e..63961d1 100644 --- a/frontend/iQMA-Skills-Builder/app/SelfReflection.tsx +++ b/frontend/iQMA-Skills-Builder/app/SelfReflection.tsx @@ -12,8 +12,8 @@ import ProgressBar from '@/components/ProgressBar'; import SectionCard from '@/components/SectionCard'; import {formatSection} from '@/helpers/formatSectionID'; import {formatUnit} from '@/helpers/formatUnitID'; -import { useNavigation } from '@react-navigation/native'; -import { LoadingIndicator } from '@/components/LoadingIndicator'; +import {useNavigation} from '@react-navigation/native'; +import {LoadingIndicator} from '@/components/LoadingIndicator'; export default function SelfReflection() { const navigation = useNavigation(); @@ -53,12 +53,14 @@ export default function SelfReflection() { setSectionNumber(formatSection(sectionID as string)); setUnitNumber(formatUnit(unitID as string)); } catch (error) { - console.error("Error fetching unitDetails in Self-Reflection", error); + console.error( + 'Error fetching unitDetails in Self-Reflection', + error + ); } finally { setIsLoading(false); } })(); - } }, [sectionID, unitID]); @@ -83,11 +85,7 @@ export default function SelfReflection() { title={`SECTION ${sectionNumber}, UNIT ${unitNumber}`} subtitle={unitName} /> - - Self Reflection - + Self Reflection - + Unit {unitNumber}: Introduction diff --git a/frontend/iQMA-Skills-Builder/app/VideoQuiz.tsx b/frontend/iQMA-Skills-Builder/app/VideoQuiz.tsx index 926e374..7abd367 100644 --- a/frontend/iQMA-Skills-Builder/app/VideoQuiz.tsx +++ b/frontend/iQMA-Skills-Builder/app/VideoQuiz.tsx @@ -40,11 +40,12 @@ export default function VideoQuiz() { unitID as string ); - const lessonDetails = await lessonEndpoints.getLessonDetails( - sectionID as string, - unitID as string, - lessonID as string - ); + const lessonDetails = + await lessonEndpoints.getLessonDetails( + sectionID as string, + unitID as string, + lessonID as string + ); const response = await quizEndpoints.getQuizzes( sectionID as string, @@ -63,7 +64,6 @@ export default function VideoQuiz() { setIsLoading(false); } })(); - } }, [sectionID, unitID, lessonID]);