1
1
import React from 'react' ;
2
2
import { useCallback , useContext , useEffect , useRef , useState } from 'react' ;
3
3
import Loader from '../components/Loader' ;
4
- import PageHeader from '../components/PageHeader' ;
5
4
import './css/conceptMap.css' ;
6
5
import jwtDecode from 'jwt-decode' ;
7
6
import { StudentSelectionContext } from "../components/StudentSelectionWrapper" ;
@@ -15,7 +14,7 @@ import apiv2 from "../utils/apiv2";
15
14
* and displays the concept map within an iframe.
16
15
* 2. The concept map iframe src takes in a string of numbers to display a concept map,
17
16
* a. This makes an API call to the Python Flask application to create the concept map.
18
- * b. Each number represents a student's mastery level for a particular concept.
17
+ * b. Each number represents a student's mastery level for a particular concept.
19
18
* 3. The concept nodes are arranged vertically from top to bottom.
20
19
* 4. The list of numerical strings associated with each node is sorted horizontally from left to right.
21
20
* a. This numerical string is calculated through the Google Sheets data in the JavaScript API call.
@@ -26,8 +25,8 @@ export default function ConceptMap() {
26
25
const [ loading , setLoading ] = useState ( false ) ;
27
26
const [ studentMastery , setStudentMastery ] = useState ( '000000' ) ;
28
27
29
- /** The iframeRef is initially set to null. Once the HTML webpage is loaded
30
- * for the concept map, the iframeRef is dynamically set to the fetched
28
+ /** The iframeRef is initially set to null. Once the HTML webpage is loaded
29
+ * for the concept map, the iframeRef is dynamically set to the fetched
31
30
* progress report query string iframe for the selected student.
32
31
*/
33
32
const iframeRef = useRef ( null ) ;
@@ -46,7 +45,7 @@ export default function ConceptMap() {
46
45
47
46
/**
48
47
* Fetch the logged-in student's mastery data on component mount (student view).
49
- * This effect fetches data based on the JWT token stored
48
+ * This effect fetches data based on the JWT token stored
50
49
* in localStorage and updates the component's state.
51
50
*/
52
51
useEffect ( ( ) => {
@@ -89,12 +88,12 @@ export default function ConceptMap() {
89
88
90
89
/**
91
90
* Render the concept map iframe with the fetched mastery data.
92
- * This iframe src takes in a string of numbers
91
+ * This iframe src takes in a string of numbers
93
92
* (progressQueryString) to display a concept map.
94
93
*/
95
94
return (
96
95
< >
97
- < PageHeader > Concept Map</ PageHeader >
96
+ { /* <PageHeader>Concept Map</PageHeader> */ }
98
97
< div style = { { textAlign : 'center' , height :"100%" } } overflow = "hidden" >
99
98
< iframe
100
99
ref = { iframeRef }
0 commit comments