remove notice banner and add tags/meta to uploads
This commit is contained in:
+1
-29
@@ -4,13 +4,12 @@ import Head from "next/head";
|
||||
import { useRouter } from "next/router";
|
||||
import { setCookie } from "nookies";
|
||||
import { connect } from "react-redux";
|
||||
import { getNotice, getToken, hashString, getPortalLogin } from "../actions";
|
||||
import { getToken, hashString, getPortalLogin } from "../actions";
|
||||
import CookieBanner from "../components/cookieBanner";
|
||||
import Footer from "../components/footer";
|
||||
import Header from "../components/header";
|
||||
import Main from "../components/main";
|
||||
import ServiceBanner from "../components/servicebanner";
|
||||
import NoticeBanner from "../components/noticebanner";
|
||||
import {
|
||||
setAccountDetails,
|
||||
setContainerID,
|
||||
@@ -28,7 +27,6 @@ const Home = (props) => {
|
||||
loginEmailStr,
|
||||
loggedInUserEmail,
|
||||
hasLoginCode,
|
||||
noticeContent,
|
||||
} = props;
|
||||
let { t, lang } = useTranslation();
|
||||
|
||||
@@ -69,26 +67,6 @@ const Home = (props) => {
|
||||
}))
|
||||
: console.log("no value in user id");
|
||||
|
||||
var noticeDateFrom = new Date(
|
||||
noticeContent.value[0].dateFrom.split("/")[2],
|
||||
noticeContent.value[0].dateFrom.split("/")[1] - 1,
|
||||
noticeContent.value[0].dateFrom.split("/")[0]
|
||||
);
|
||||
|
||||
var noticeDateTo = new Date(
|
||||
noticeContent.value[0].dateTo.split("/")[2],
|
||||
noticeContent.value[0].dateTo.split("/")[1] - 1,
|
||||
noticeContent.value[0].dateTo.split("/")[0]
|
||||
);
|
||||
|
||||
var today = new Date();
|
||||
var day = today.getDate();
|
||||
var month = today.getMonth();
|
||||
var year = today.getFullYear();
|
||||
|
||||
today = new Date(year, month, day);
|
||||
const displayNotice = today >= noticeDateFrom && today <= noticeDateTo;
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Head>
|
||||
@@ -151,9 +129,6 @@ const Home = (props) => {
|
||||
) : (
|
||||
<>
|
||||
<ServiceBanner />
|
||||
{displayNotice && (
|
||||
<NoticeBanner noticeContent={noticeContent} />
|
||||
)}
|
||||
<Main
|
||||
pages={pages}
|
||||
showLogin={showLogin}
|
||||
@@ -192,8 +167,6 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
|
||||
console.log("hasloginCode:", hasLoginCode + "\n////////////////////\n");
|
||||
|
||||
const noticeContent = await getNotice();
|
||||
|
||||
let ggToken = {};
|
||||
let ggUserInfo = {};
|
||||
let portalUserObj = {};
|
||||
@@ -216,7 +189,6 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
loggedInUserId: portalUserObj,
|
||||
loggedInUserEmail: loginEmailStr,
|
||||
hasLoginCode: hasLoginCode,
|
||||
noticeContent: noticeContent,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user