diff --git a/.env.local b/.env.local index af89d049..fdfc86cd 100644 --- a/.env.local +++ b/.env.local @@ -44,7 +44,7 @@ RELAYPATH = "dev-pedw-hc" GOOGLE_TAG_MANAGER = GTM-T78CBC3 -SHOWLOGIN = "true" +SHOWLOGIN = "false" SHOWREPRESENTATIONS = false SHOWFILEUPLOAD = "false" SHOWMAPS = "true" diff --git a/actions/index.js b/actions/index.js index 11f3cf87..f1d38b78 100644 --- a/actions/index.js +++ b/actions/index.js @@ -1298,3 +1298,15 @@ export const sendEmail = async ( console.log("this serror", error); }); }; + +export const getNotice = () => { + return axios + .get(BASE_URL + "/api/notices") + .then((res) => { + //console.log("//////////----", res.data); + return res.data; + }) + .catch((error) => { + console.log("this serror", error); + }); +}; diff --git a/components/breadcrumbs.js b/components/breadcrumbs.js index c7f681a5..bf0c1be6 100644 --- a/components/breadcrumbs.js +++ b/components/breadcrumbs.js @@ -5,6 +5,7 @@ import { useState } from "react"; import { useRouter } from "next/router"; import useTranslation from "next-translate/useTranslation"; import LoadingOverlay from "react-loading-overlay"; +import { getSession, useSession } from "next-auth/react"; const Breadcrumbs = (props) => { const { courseContent, slug, currentView } = props; @@ -45,6 +46,9 @@ const Breadcrumbs = (props) => { // ? setShowSpinnerState(false) // : setShowSpinnerState(true); // }; + + const { data: session, status } = useSession(); + return ( <>