diff --git a/src/pages/importCsv.tsx b/src/pages/importCsv.tsx index bc8f5fa2..3e5a62de 100644 --- a/src/pages/importCsv.tsx +++ b/src/pages/importCsv.tsx @@ -51,7 +51,7 @@ const ImportCsv = () => { const tstore = taxonomyStore(); const { subject } = router.query; const { t } = useTranslation(); - const [subjectDetails, setSubjectDetails] = useState(null); + const [open, setOpen] = useState(false); const [selectedFile, setSelectedFile] = useState(null); const [loading, setLoading] = useState(true); @@ -69,26 +69,6 @@ const ImportCsv = () => { const isSmallScreen = useMediaQuery(theme.breakpoints.down("sm")); const setResources = taxonomyStore((state) => state.setResources); - useEffect(() => { - const fetchData = async () => { - // Simulate data fetching - setTimeout(() => { - if (typeof subject === "string") { - const card = cardData.find((card) => card.subjects.includes(subject)); - if (card) { - setSubjectDetails({ - ...card, - subject, - }); - } - } - setLoading(false); - }, 1000); // Simulated loading time - }; - - fetchData(); - }, [subject]); - const fetchCourseDetails = useCallback(async () => { try { setLoading(true); @@ -156,7 +136,6 @@ const ImportCsv = () => { }); setUserProjectDetails(userProjectDetailsResponse?.result?.tasks); if (userProjectDetails?.length) { - } setLoading(false); } catch (error) { @@ -193,13 +172,12 @@ const ImportCsv = () => { const handleDownloadCSV = () => { const link = document.createElement("a"); - link.href = "/Sample.csv"; + link.href = "/Sample.csv"; link.download = "Sample.csv"; document.body.appendChild(link); link.click(); document.body.removeChild(link); }; - const handleUpload = async () => { if (selectedFile) {