14769 search by project type
This commit is contained in:
@@ -3,14 +3,14 @@ import useTranslation from "next-translate/useTranslation";
|
||||
import Head from "next/head";
|
||||
import { useRouter } from "next/router";
|
||||
import { connect } from "react-redux";
|
||||
import { getAppealsTypes, getLPA } from "../actions";
|
||||
import { getAppealsTypes, getProjectTypes, getLPA } from "../actions";
|
||||
import Breadcrumbs from "../components/breadcrumbs";
|
||||
import CookieBanner from "../components/cookieBanner";
|
||||
import CRMError from "../components/crmError";
|
||||
import Footer from "../components/footer";
|
||||
import Header from "../components/header";
|
||||
import Search from "../components/search";
|
||||
import { setAppealType } from "../store/appealType/action";
|
||||
import { setAppealType, setProjectType } from "../store/appealType/action";
|
||||
import { setLPA } from "../store/lpa/action";
|
||||
import { wrapper } from "../store/store";
|
||||
import ServiceBanner from "../components/servicebanner";
|
||||
@@ -110,6 +110,7 @@ const Home = (props) => {
|
||||
<Search
|
||||
lpadata={props.LPAData}
|
||||
appealType={props.appealType}
|
||||
props={props}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
@@ -122,8 +123,9 @@ const Home = (props) => {
|
||||
export const getServerSideProps = wrapper.getServerSideProps(
|
||||
(store) =>
|
||||
async ({ query, req, res }) => {
|
||||
let [appealTypeData, lpaData] = await Promise.all([
|
||||
let [appealTypeData, projectTypeData, lpaData] = await Promise.all([
|
||||
await getAppealsTypes(),
|
||||
await getProjectTypes(),
|
||||
await getLPA(),
|
||||
]);
|
||||
|
||||
@@ -131,6 +133,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
//const appealTypeData = require("../data/appealtypes.json");
|
||||
|
||||
store.dispatch(setAppealType(appealTypeData));
|
||||
store.dispatch(setProjectType(projectTypeData));
|
||||
store.dispatch(setLPA(lpaData));
|
||||
}
|
||||
);
|
||||
@@ -142,7 +145,7 @@ const mapStateToProps = (state) => {
|
||||
formData: state.formData,
|
||||
appealType: state.appealType,
|
||||
LPAData: state.LPAData,
|
||||
//form: state.form,
|
||||
form: state.form,
|
||||
accountDetails: state.accountDetails,
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user