From 94ecbec33492df9be9b79704195945a80e9f6d27 Mon Sep 17 00:00:00 2001 From: itsvick Date: Thu, 5 Dec 2024 17:09:24 +0530 Subject: [PATCH] Issue #PS-0000 fix: Updated course-hierarchy --- src/components/CommonUserModal.tsx | 1 + src/pages/block.tsx | 2 +- src/pages/course-hierarchy/[identifier].tsx | 26 +++++++-------------- src/pages/stateDetails.tsx | 2 +- src/pages/subjectDetails.tsx | 2 +- 5 files changed, 13 insertions(+), 20 deletions(-) diff --git a/src/components/CommonUserModal.tsx b/src/components/CommonUserModal.tsx index d294f031..224340ef 100644 --- a/src/components/CommonUserModal.tsx +++ b/src/components/CommonUserModal.tsx @@ -654,6 +654,7 @@ console.log("userType",userType, FormContextType.CONTENT_CREATOR) color: "secondary", fontSize: "14px", fontWeight: "500", + textTransform: "capitalize" }} variant="outlined" > diff --git a/src/pages/block.tsx b/src/pages/block.tsx index 9f047d01..e57e9207 100644 --- a/src/pages/block.tsx +++ b/src/pages/block.tsx @@ -1044,7 +1044,7 @@ const Block: React.FC = () => { flexDirection={"column"} alignItems={"center"} > - + ) : ( <> diff --git a/src/pages/course-hierarchy/[identifier].tsx b/src/pages/course-hierarchy/[identifier].tsx index e266e949..3e75207a 100644 --- a/src/pages/course-hierarchy/[identifier].tsx +++ b/src/pages/course-hierarchy/[identifier].tsx @@ -6,12 +6,14 @@ import { Typography, Link, Box, + Grid, } from '@mui/material'; import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; import { getContentHierarchy } from '@/services/coursePlanner'; import { useRouter } from 'next/router'; import Loader from '@/components/Loader'; import { serverSideTranslations } from 'next-i18next/serverSideTranslations'; +import ResourceCard from '@/components/ResourceCard'; const RecursiveAccordion = ({ data }: { data: any[] }) => { let router = useRouter(); @@ -38,22 +40,12 @@ const RecursiveAccordion = ({ data }: { data: any[] }) => { {node.children && renderAccordion(node.children, level + 1)} ) : node.contentType === 'Resource' ? ( - - router.push(`/play/content/${node?.identifier || node?.id}`) - } - > + + + + + + ) : ( }> @@ -114,7 +106,7 @@ export default function CourseHierarchy() { if (loading) { return ( - + ); } diff --git a/src/pages/stateDetails.tsx b/src/pages/stateDetails.tsx index ba8e7c93..540d52e2 100644 --- a/src/pages/stateDetails.tsx +++ b/src/pages/stateDetails.tsx @@ -68,7 +68,7 @@ const StateDetails = () => { }; if (loading) { - return ; + return ; } return ( diff --git a/src/pages/subjectDetails.tsx b/src/pages/subjectDetails.tsx index c2667446..25c57a3a 100644 --- a/src/pages/subjectDetails.tsx +++ b/src/pages/subjectDetails.tsx @@ -475,7 +475,7 @@ const SubjectDetails = () => { }, [selectedtype]); if (loading) { - return ; + return ; } const handleBackClick = () => {