diff --git a/src/pages/subjectDetails.tsx b/src/pages/subjectDetails.tsx index 1f856bf2..d0d734de 100644 --- a/src/pages/subjectDetails.tsx +++ b/src/pages/subjectDetails.tsx @@ -85,6 +85,15 @@ const SubjectDetails = () => { const setTaxonomyType = taxonomyStore((state) => state.setTaxonomyType); const setTaxonomySubject = taxonomyStore((state) => state.setTaxonomySubject); + useEffect(() => { + const savedMedium = localStorage.getItem("selectedMedium") || ""; + const savedGrade = localStorage.getItem("selectedGrade") || ""; + const savedType = localStorage.getItem("selectedType") || ""; + setSelectedmedium(savedMedium); + setSelectedgrade(savedGrade); + // setSelectedtype(savedType); + }, []); + useEffect(() => { const subjects = localStorage.getItem("overallCommonSubjects"); @@ -164,16 +173,6 @@ const SubjectDetails = () => { fetchFrameworkDetails(); }, [boardName]); - useEffect(() => { - const savedMedium = localStorage.getItem("selectedMedium") || ""; - const savedGrade = localStorage.getItem("selectedGrade") || ""; - const savedType = localStorage.getItem("selectedType") || ""; - - setSelectedmedium(savedMedium); - setSelectedgrade(savedGrade); - setSelectedtype(savedType); - }, []); - const fetchAndSetGradeData = (medium: any) => { const getGrades = getOptionsByCategory(store?.framedata, "gradeLevel"); const mediumAssociations = getAssociationsByCodeNew(mediumOptions, medium);