added crm driven form via oauth
This commit is contained in:
@@ -19,7 +19,7 @@ import {
|
||||
setSearchResults,
|
||||
getSearchResultsObj,
|
||||
} from "../store/searchOutput/action";
|
||||
import { getBasicSearch } from "../actions";
|
||||
import { getBasicSearch, getBasicSearchDetails } from "../actions";
|
||||
|
||||
const Home = (props) => {
|
||||
const { footerLinks, pages } = props;
|
||||
@@ -57,8 +57,13 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
(store) =>
|
||||
async ({ query, req, res }) => {
|
||||
console.log("query-", query);
|
||||
const searchResultsObj = (await getBasicSearch(query.q)) || null;
|
||||
const [searchResultsObj, searchDetailsObj] = await Promise.all(
|
||||
await getBasicSearch(query.q),
|
||||
await getBasicSearchDetails(query.d)
|
||||
);
|
||||
|
||||
store.dispatch(setSearchResults(searchResultsObj));
|
||||
store.dispatch(setSearchDetails(searchDetailsObj));
|
||||
store.dispatch(setSearch(query.q));
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user