diff --git a/src/assets/images/mp.png b/src/assets/images/mp.png new file mode 100644 index 00000000..bda880db Binary files /dev/null and b/src/assets/images/mp.png differ diff --git a/src/components/PlannedSession.tsx b/src/components/PlannedSession.tsx index 0da3a184..cb8cd54e 100644 --- a/src/components/PlannedSession.tsx +++ b/src/components/PlannedSession.tsx @@ -58,6 +58,7 @@ import WeekDays from './WeekDays'; import { getOptionsByCategory } from '@/utils/Helper'; import { telemetryFactory } from '@/utils/telemetry'; import { DesktopTimePicker } from '@mui/x-date-pickers/DesktopTimePicker'; +import useNotification from '@/hooks/useNotification'; dayjs.extend(utc); dayjs.extend(timezone); @@ -810,6 +811,7 @@ const PlannedSession: React.FC = ({ ) ); }; + const { getNotification } = useNotification(); const handleAddSession = () => { const newSessionId = sessionBlocks.length; @@ -976,6 +978,34 @@ const PlannedSession: React.FC = ({ 'success' ); + if (cohortId) { + const filters = { + cohortId, + role: Role.STUDENT, + // status: [Status.ACTIVE], + }; + + try { + const response = await getMyCohortMemberList({ + // limit: 20, + // page: 0, + filters, + }); + + if (response?.result?.userDetails) { + const deviceId = response?.result?.userDetails.map((device: any) => device?.deviceId).filter((id: any) => id !== null); + if (deviceId?.length > 0) { + getNotification(deviceId, "LEARNER_NEW_SESSION_ALERT"); + } else { + console.warn("No valid device IDs found. Skipping notification API call."); + } + } + } catch (error) { + console.error("Error fetching cohort member list:", error); + } + } + + const windowUrl = window.location.pathname; const cleanedUrl = windowUrl.replace(/^\//, ''); const telemetryInteract = { diff --git a/src/components/youthNet/UploadedFile.tsx b/src/components/youthNet/UploadedFile.tsx new file mode 100644 index 00000000..8156953a --- /dev/null +++ b/src/components/youthNet/UploadedFile.tsx @@ -0,0 +1,64 @@ +import React from 'react'; +import { Box, Typography } from '@mui/material'; +import { VillageDetailProps } from '@/utils/Interfaces'; +import { useTheme } from '@mui/material/styles'; +import Image from 'next/image'; +import mp from './../../assets/images/mp.png' +import GetAppIcon from '@mui/icons-material/GetApp'; + + + + +const UploadedFile: React.FC = ({ + title, +}) => { + const theme = useTheme(); + return ( + + + + + + Login Image + + + {title && ( + + {title} + + )} + + + + + + + ); +}; + +export default UploadedFile; diff --git a/src/pages/centers/[cohortId]/index.tsx b/src/pages/centers/[cohortId]/index.tsx index 67473a6f..1a55d2e5 100644 --- a/src/pages/centers/[cohortId]/index.tsx +++ b/src/pages/centers/[cohortId]/index.tsx @@ -213,32 +213,7 @@ const CohortPage = () => { }); - if (cohortId) { - const filters = { - cohortId, - role: Role.STUDENT, - // status: [Status.ACTIVE], - }; - try { - const response = await getMyCohortMemberList({ - // limit: 20, - // page: 0, - filters, - }); - - if (response?.result?.userDetails) { - const deviceId = response?.result?.userDetails.map((device: any) => device?.deviceId).filter((id:any) => id !== null); - if (deviceId?.length > 0) { - getNotification(deviceId, "LEARNER_NEW_SESSION_ALERT"); - } else { - console.warn("No valid device IDs found. Skipping notification API call."); - } - } - } catch (error) { - console.error("Error fetching cohort member list:", error); - } - } }; const handleCloseSchedule = () => {