import React from 'react' import { Box, Typography, IconButton } from '@mui/material' import ExpandMoreIcon from '@mui/icons-material/ExpandMore' import ExpandLessIcon from '@mui/icons-material/ExpandLess' import { useSelector } from 'react-redux' import { toggleShowAll } from '@/redux/slices/courseDetailsSlice' import { RootState } from '@/redux/store' import './ExploreCoursesDetails.css' import { useAppDispatch } from '@/redux/hooks' import { courseaboutDetails } from './exploreCourseStaticData' const ExploreDetailsAboutCourse: React.FC = () => { const dispatch = useAppDispatch() const showAll = useSelector((state: RootState) => state.courseDetails.showAll) const toggleView = () => { dispatch(toggleShowAll()) } return ( About the course {/* First Paragraph */} {courseaboutDetails.para1} {/* Second Paragraph */} {courseaboutDetails.para2} {/* Show more content */} {showAll && ( {courseaboutDetails.para3} {courseaboutDetails.para4} {courseaboutDetails.para5} )} {/* Toggle Button */}
{showAll ? 'Show less' : 'Show more'} {showAll ? : }
) } export default ExploreDetailsAboutCourse