information banner from api with date range

This commit is contained in:
2022-09-22 11:12:04 +01:00
parent f9cdaafd7c
commit 38e70b1ec1
17 changed files with 548 additions and 119 deletions
+33
View File
@@ -7,6 +7,14 @@ import CookieBanner from "../../components/cookieBanner";
import Footer from "../../components/footer";
import Header from "../../components/header";
import Case from "../../components/representation";
import { wrapper } from "../../store/store";
import { getSession, useSession } from "next-auth/react";
import { getPersonalAccount } from "../../actions";
import {
setAccountDetails,
setContainerID,
setLoggedInUserId,
} from "../../store/accountDetails/action";
const Home = (props) => {
const { footerLinks, pages } = props;
@@ -113,10 +121,35 @@ const Home = (props) => {
);
};
// export const getServerSideProps = wrapper.getServerSideProps(
// (store) => async (ctx) => {
// const { query, req, res } = ctx;
// console.log("The query", query);
// const { cookies } = req;
// let loggedInUser = cookies.pinsUser;
// let thisSession = await getSession(ctx);
// console.log(loggedInUser, thisSession);
// const accountDetails = await getPersonalAccount(loggedInUser);
// store.dispatch(setAccountDetails(accountDetails));
// return {
// props: {
// containerID: thisSession.user.id,
// },
// };
// }
// );
const mapStateToProps = (state) => {
//console.log(state);
return {
accountDetails: state.accountDetails,
currentView: state.currentView,
search: state.search,
searchResultsObj: state.searchResultsObj,