This commit is contained in:
2022-12-16 11:36:01 +00:00
parent f6d934d951
commit 98aefdd867
36 changed files with 1258 additions and 371 deletions
+6 -3
View File
@@ -14,6 +14,7 @@ import {
setSearchDetails,
setSearchResults,
} from "../store/searchOutput/action";
import { setShowReps } from "../store/currentView/action";
import { wrapper } from "../store/store";
import _ from "lodash";
@@ -116,9 +117,9 @@ const Home = (props) => {
};
export const getServerSideProps = wrapper.getServerSideProps(
(store) =>
async ({ query, req, res }) => {
console.log("query-", query);
(store) => async (ctx) => {
const { query, req, res } = ctx;
console.log("query-", query);
let isLinked =
typeof query.lk != "undefined" && query.lk == "1"
@@ -127,6 +128,8 @@ export const getServerSideProps = wrapper.getServerSideProps(
//console.log("is linked:", isLinked);
const showLoginCheck = process.env.SHOWLOGIN || false;
const showReps = process.env.SHOWREPRESENTATIONS || false;
store.dispatch(setShowReps(showReps));
let searchResultsObj = await getBasicSearch(query.q);