Skip to content

Commit

Permalink
Issue #0000 feat: Course planner bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Arif-tekdi-technologies committed Nov 26, 2024
1 parent c1b009c commit 8c50f0f
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/pages/subjectDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 8c50f0f

Please sign in to comment.