From 8a04370216a034a820f2e1bc0e7095a9fbeb9ec1 Mon Sep 17 00:00:00 2001 From: Arif Date: Fri, 30 Aug 2024 15:45:52 +0530 Subject: [PATCH] fixes --- src/components/FilterSearchBar.tsx | 55 +----------------------------- src/data/cardData.js | 4 +-- src/pages/importCsv.tsx | 24 ++++++------- src/pages/subjectDetails.tsx | 20 +++-------- 4 files changed, 19 insertions(+), 84 deletions(-) diff --git a/src/components/FilterSearchBar.tsx b/src/components/FilterSearchBar.tsx index 00f601d1..58585608 100644 --- a/src/components/FilterSearchBar.tsx +++ b/src/components/FilterSearchBar.tsx @@ -73,60 +73,7 @@ const FilterSearchBar: React.FC = ({ )} - {showGradeMedium && ( - - - - {t("COURSE_PLANNER.GRADE")} - - - - - - {t("COURSE_PLANNER.MEDIUM")} - - - - - )} + {card && ( { try { setLoading(true); const response = await getTargetedSolutions({ - subject: 'Assamese', - class: '6', + subject: 'Tamil', + class: '4', state: 'Maharashtra', - board: 'AAKR', + board: 'TQKR', type: 'mainCourse', - medium: 'Assamese', + medium: 'Telugu', }); const courseData = response.result.data[0]; @@ -115,12 +115,12 @@ const ImportCsv = () => { }); const updatedResponse = await getTargetedSolutions({ - subject: 'Assamese', - class: '6', + subject: 'Tamil', + class: '4', state: 'Maharashtra', - board: 'AAKR', + board: 'TQKR', type: 'mainCourse', - medium: 'Assamese', + medium: 'Telugu', }); setLoading(false); return updatedResponse.result.data[0]._id; @@ -175,12 +175,12 @@ const ImportCsv = () => { const handleUpload = async () => { if (selectedFile) { const metaData: CoursePlannerMetaData = { - subject: 'Assamese', - class: '6', + subject: 'Tamil', + class: '4', state: 'Maharashtra', - board: 'AAKR', + board: 'TQKR', type: 'mainCourse', - medium: 'Assamese', + medium: 'Telugu', }; const result = await uploadCoursePlanner(selectedFile, metaData) diff --git a/src/pages/subjectDetails.tsx b/src/pages/subjectDetails.tsx index 1cf29c59..3a11e36c 100644 --- a/src/pages/subjectDetails.tsx +++ b/src/pages/subjectDetails.tsx @@ -99,9 +99,7 @@ const SubjectDetails = () => { return ; } - if (!card) { - return Card not found; - } + const handleBackClick = () => { router.back(); @@ -139,22 +137,12 @@ const SubjectDetails = () => { - {card.state} + {card?.state} - + - - {card.boardsUploaded} / {card.totalBoards} {"boards fully uploaded"} - + {subject?.terms?.map((subj:any, index:any) => (