diff --git a/packages/nulp_elite/src/assets/cardBanner/environmentandclimate.png b/packages/nulp_elite/src/assets/cardBanner/environmentandclimate.png new file mode 100644 index 00000000..43a8795d Binary files /dev/null and b/packages/nulp_elite/src/assets/cardBanner/environmentandclimate.png differ diff --git a/packages/nulp_elite/src/components/Card.js b/packages/nulp_elite/src/components/Card.js index 0a070d16..d092b804 100644 --- a/packages/nulp_elite/src/components/Card.js +++ b/packages/nulp_elite/src/components/Card.js @@ -10,7 +10,7 @@ import { Divider } from "native-base"; import RandomImage from "../assets/cardRandomImgs.json"; import { useTranslation } from "react-i18next"; const processString = (str) => { - return str.replace(/[^a-zA-Z0-9]/g, "").toLowerCase(); + return str?.replace(/[^a-zA-Z0-9]/g, "").toLowerCase(); }; export default function BoxCard({ items, index, onClick, continueLearning }) { const [imgUrl, setImgUrl] = useState(); @@ -212,34 +212,34 @@ export default function BoxCard({ items, index, onClick, continueLearning }) { items?.se_gradeLevels) && ( <> - {(items?.board || items?.se_boards) && ( - 1 - ? items.se_boards.join(", ") - : items?.se_boards?.[0] || "" - } - placement="top" - className="labelOne cardLabelEllips" - > - - - )} + {items?.board ? ( + + + +) : ( + 0 + ? items.se_boards.join(", ") + : "" + } + placement="top" + className="labelOne cardLabelEllips" + > + + +)} {(items.gradeLevel || items.se_gradeLevels) && ( { }); }; - const handleLinkClick = (id) => { - if (isEnroll) { - navigate(`${routeConfig.ROUTES.PLAYER_PAGE.PLAYER}?${id}`, { - state: { - coursename: userData?.result?.content?.name, - batchid: batchDetails?.batchId, - courseid: contentId, - isenroll: isEnroll, - consumedcontents: ConsumedContents, - }, - }); - } else { - showOpenContenErrorMessage( - "You must join the course to get complete access to content." - ); - } - }; + + const handleLinkClick = (id) => { + if (isEnroll) { + navigate(`${routeConfig.ROUTES.PLAYER_PAGE.PLAYER}?${id}`, { + state: { + coursename: userData?.result?.content?.name, + batchid: batchDetails?.batchId, + courseid: contentId, + isenroll: isEnroll, + consumedcontents: ConsumedContents, + }, + }); + } else { + showErrorMessage("You must join the course to get complete access to content."); + } +}; + const handleSnackbarClose = (event, reason) => { if (reason === "clickaway") { diff --git a/packages/nulp_elite/src/pages/search/ContentList.js b/packages/nulp_elite/src/pages/search/ContentList.js index 3eec31b2..b0d108c3 100644 --- a/packages/nulp_elite/src/pages/search/ContentList.js +++ b/packages/nulp_elite/src/pages/search/ContentList.js @@ -180,7 +180,7 @@ const ContentList = (props) => { "eTextBook", "TVLesson", ]}), - se_boards: domainfilter.se_board || [domainName], + board: domainfilter.se_board || [domainName], se_gradeLevels: subDomainFilter && subDomainFilter.length > 0 ? subDomainFilter