show/hde map with env variable
This commit is contained in:
@@ -31,7 +31,7 @@ import {
|
||||
} from "../../store/watchedCases/action";
|
||||
|
||||
const Home = (props) => {
|
||||
const { footerLinks, pages, watchedCases } = props;
|
||||
const { footerLinks, pages, watchedCases, showMap } = props;
|
||||
let { t, lang } = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
@@ -112,6 +112,7 @@ const Home = (props) => {
|
||||
<div className="govuk-width-container">
|
||||
<Breadcrumbs slug={appealtypes} />
|
||||
<DNSSearchResults
|
||||
showMap={showMap}
|
||||
searchString="DNS"
|
||||
searchResultsObj={props.searchResultsObj}
|
||||
myportal={true}
|
||||
@@ -152,6 +153,8 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
}
|
||||
: searchResultsObj;
|
||||
|
||||
const showMapCheck = process.env.SHOWMAPS || false;
|
||||
|
||||
const [searchDetailsObj, watchedCasesDetails] = await Promise.all([
|
||||
await getSearchDetails(searchResultsObj),
|
||||
await getDetails(watchedCases, "myWatchedCases"),
|
||||
@@ -163,6 +166,9 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
store.dispatch(setDNSCoords(dnsCoords));
|
||||
store.dispatch(setWatchedCases(watchedCases));
|
||||
store.dispatch(setWatchedCasesDetails(watchedCasesDetails));
|
||||
return {
|
||||
props: { showMap: showMapCheck },
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@ const Home = (props) => {
|
||||
appealTypeID={
|
||||
props.currentView.caseReference.appealType
|
||||
}
|
||||
showMap={props.currentView.caseReference.showMap}
|
||||
/>
|
||||
</div>
|
||||
<Footer footerLinks={footerLinks} />
|
||||
|
||||
Reference in New Issue
Block a user