information banner from api with date range
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user