pagination for documents seo head meta refactor

This commit is contained in:
2021-10-22 13:23:38 +01:00
parent c388aec21f
commit 346cefd1bb
31 changed files with 1478 additions and 533 deletions
+62
View File
@@ -53,6 +53,68 @@ const Home = (props) => {
<title>
{t("search:page-title")} - {t("common:service-name")}
</title>
{/* Language by default is EN, if multilingual site this will need updated */}
<>
<link
rel="canonical"
href={t("common:gov-wales-link") + router.asPath}
/>
<meta
key="og:locale"
property="og:locale"
content={router.locale}
/>
{/* If they have a Twitter Handle, include the meta details below */}
<meta
key="og:site_name"
property="og:site_name"
content={t("common:service-name")}
/>
<meta
key="twitter:site"
property="twitter:site"
content="@UKGovWales"
/>
<meta
name="description"
content={t("common:service-description")}
/>
<meta
property="og:site_name"
content={t("common:gov-wales-label")}
/>
<meta
property="og:title"
content={t("search:page-title")}
/>
<meta
property="og:description"
content={t("common:service-description")}
/>
<meta property="og:type" content="website" />
<meta
property="og:url"
content={t("common:gov-wales-link")}
/>
<meta
property="og:image"
content="https://gov.wales/themes/custom/govwales/images/content/og-global-1200.png"
/>
<meta name="twitter:card" content="summary" />
<meta
name="twitter:title"
content={t("common:gov-wales-label")}
/>
<meta
name="twitter:url"
content={t("common:gov-wales-link") + router.asPath}
/>
<meta
name="twitter:image"
content="https://gov.wales/themes/custom/govwales/images/content/og-global-120.png"
/>
</>
</Head>
<div id="page_wrapper">
<CookieBanner />
+62 -45
View File
@@ -15,7 +15,7 @@ import { useRouter } from "next/router";
import useTranslation from "next-translate/useTranslation";
import jsonpath from "jsonpath";
import data from "../data/collections.json";
import { getSearchDetails } from "../components/utils";
import { setSearch, getSearchObj } from "../store/search/action";
import {
setSearchResults,
@@ -42,6 +42,67 @@ const Home = (props) => {
<title>
{t("search:page-title")} - {t("common:service-name")}
</title>
<>
<link
rel="canonical"
href={t("common:gov-wales-link") + router.asPath}
/>
<meta
key="og:locale"
property="og:locale"
content={router.locale}
/>
{/* If they have a Twitter Handle, include the meta details below */}
<meta
key="og:site_name"
property="og:site_name"
content={t("common:service-name")}
/>
<meta
key="twitter:site"
property="twitter:site"
content="@UKGovWales"
/>
<meta
name="description"
content={t("common:service-description")}
/>
<meta
property="og:site_name"
content={t("common:gov-wales-label")}
/>
<meta
property="og:title"
content={t("search:page-title")}
/>
<meta
property="og:description"
content={t("common:service-description")}
/>
<meta property="og:type" content="website" />
<meta
property="og:url"
content={t("common:gov-wales-link")}
/>
<meta
property="og:image"
content="https://gov.wales/themes/custom/govwales/images/content/og-global-1200.png"
/>
<meta name="twitter:card" content="summary" />
<meta
name="twitter:title"
content={t("common:gov-wales-label")}
/>
<meta
name="twitter:url"
content={t("common:gov-wales-link") + router.asPath}
/>
<meta
name="twitter:image"
content="https://gov.wales/themes/custom/govwales/images/content/og-global-120.png"
/>
</>
</Head>
<div id="page_wrapper">
<CookieBanner />
@@ -80,50 +141,6 @@ export const getServerSideProps = wrapper.getServerSideProps(
}
);
const getFormCollection = (formtype) => {
const collectionName = jsonpath.query(
data,
"$..[?(@.LogicalName=='" + formtype + "')]"
);
//console.log(collectionName[0]);
return collectionName[0];
};
const getSearchDetails = (token, searchResultsObj) => {
//console.log(searchResultsObj);
let detailsArr = [];
//console.log("searcg results", searchResultsObj);
searchResultsObj = searchResultsObj.value;
const detailsObj = searchResultsObj.map((searchDetail, index) => {
if (searchDetail.pinswg_appealcasetype == null) {
console.log(searchDetail.ticketnumber);
} else {
let formMeta = getFormCollection(
"pinswg_" +
searchDetail[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
]
.replace(/(\band|[\s\-\+\(\)\,\&])/g, "")
.toLowerCase()
.slice(0, 39)
);
detailsArr.push(
getBasicSearchDetails(
token,
formMeta.LogicalCollectionName,
searchDetail.title,
formMeta.PrimaryIdAttribute,
searchDetail.incidentid
)
);
}
});
//console.log(detailsArr);
return Promise.all(detailsArr);
};
const mapStateToProps = (state) => {
return {
currentView: state.currentView,
+10 -10
View File
@@ -1,19 +1,19 @@
import _ from "lodash";
import Head from "next/head";
import Header from "../components/header";
import Banner from "../components/banner";
import CookieBanner from "../components/cookieBanner";
import Breadcrumbs from "../components/breadcrumbs";
import CaseSummary from "../components/case";
import Footer from "../components/footer";
import Errorpage from "../components/errorpage";
import styles from "../styles/Home.module.css";
import Header from "../../components/header";
import Banner from "../../components/banner";
import CookieBanner from "../../components/cookieBanner";
import Breadcrumbs from "../../components/breadcrumbs";
import CaseSummary from "../../components/case";
import Footer from "../../components/footer";
import Errorpage from "../../components/errorpage";
import styles from "../../styles/Home.module.css";
import { useSelector, shallowEqual, connect } from "react-redux";
import { wrapper } from "../store/store";
import { wrapper } from "../../store/store";
import { useRouter } from "next/router";
import useTranslation from "next-translate/useTranslation";
import Case from "../components/case";
import Case from "../../components/case";
const Home = (props) => {
const { footerLinks, pages } = props;
+63 -43
View File
@@ -16,6 +16,8 @@ import useTranslation from "next-translate/useTranslation";
import jsonpath from "jsonpath";
import data from "../data/collections.json";
import { getSearchDetails } from "../components/utils";
import { setSearch, getSearchObj } from "../store/search/action";
import {
setSearchResults,
@@ -42,6 +44,67 @@ const Home = (props) => {
<title>
{t("search:page-title")} - {t("common:service-name")}
</title>
<>
<link
rel="canonical"
href={t("common:gov-wales-link") + router.asPath}
/>
<meta
key="og:locale"
property="og:locale"
content={router.locale}
/>
{/* If they have a Twitter Handle, include the meta details below */}
<meta
key="og:site_name"
property="og:site_name"
content={t("common:service-name")}
/>
<meta
key="twitter:site"
property="twitter:site"
content="@UKGovWales"
/>
<meta
name="description"
content={t("common:service-description")}
/>
<meta
property="og:site_name"
content={t("common:gov-wales-label")}
/>
<meta
property="og:title"
content={t("search:page-title")}
/>
<meta
property="og:description"
content={t("common:service-description")}
/>
<meta property="og:type" content="website" />
<meta
property="og:url"
content={t("common:gov-wales-link")}
/>
<meta
property="og:image"
content="https://gov.wales/themes/custom/govwales/images/content/og-global-1200.png"
/>
<meta name="twitter:card" content="summary" />
<meta
name="twitter:title"
content={t("common:gov-wales-label")}
/>
<meta
name="twitter:url"
content={t("common:gov-wales-link") + router.asPath}
/>
<meta
name="twitter:image"
content="https://gov.wales/themes/custom/govwales/images/content/og-global-120.png"
/>
</>
</Head>
<div id="page_wrapper">
<CookieBanner />
@@ -87,49 +150,6 @@ export const getServerSideProps = wrapper.getServerSideProps(
}
);
const getFormCollection = (formtype) => {
const collectionName = jsonpath.query(
data,
"$..[?(@.LogicalName=='" + formtype + "')]"
);
//console.log(collectionName[0]);
return collectionName[0];
};
const getSearchDetails = (token, searchResultsObj) => {
//console.log(searchResultsObj);
let detailsArr = [];
searchResultsObj = searchResultsObj.value;
const detailsObj = searchResultsObj.map((searchDetail, index) => {
if (searchDetail.pinswg_appealcasetype == null) {
console.log(searchDetail.title);
} else {
let formMeta = getFormCollection(
"pinswg_" +
searchDetail[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
]
.replace(/(\band|[\s\-\+\(\)\,\&])/g, "")
.toLowerCase()
.slice(0, 39)
);
detailsArr.push(
getBasicSearchDetails(
token,
formMeta.LogicalCollectionName,
searchDetail.title,
formMeta.PrimaryIdAttribute,
searchDetail.incidentid
)
);
}
});
//console.log(detailsArr);
return Promise.all(detailsArr);
};
const mapStateToProps = (state) => {
return {
currentView: state.currentView,
+47 -1
View File
@@ -20,11 +20,57 @@ const Home = (props) => {
const router = useRouter();
const { locale } = router;
console.log(router);
return (
<div>
<Head>
<title>{t("common:service-name")}</title>
{console.log(router.pathname)}
{/* Language by default is EN, if multilingual site this will need updated */}
<meta
key="og:locale"
property="og:locale"
content={router.locale}
/>
{/* If they have a Twitter Handle, include the meta details below */}
<meta
key="og:site_name"
property="og:site_name"
content={t("common:service-name")}
/>
<meta
key="twitter:site"
property="twitter:site"
content="@UKGovWales"
/>
<meta
name="description"
content={t("common:service-description")}
/>
<meta
property="og:site_name"
content={t("common:gov-wales-label")}
/>
<meta property="og:type" content="website" />
<meta property="og:url" content={t("common:gov-wales-link")} />
<meta
property="og:image"
content="https://gov.wales/themes/custom/govwales/images/content/og-global-1200.png"
/>
<meta name="twitter:card" content="summary" />
<meta
name="twitter:title"
content={t("common:gov-wales-label")}
/>
<meta
name="twitter:url"
content={t("common:gov-wales-link") + router.pathname}
/>
<meta
name="twitter:image"
content="https://gov.wales/themes/custom/govwales/images/content/og-global-120.png"
/>
</Head>
<div id="page_wrapper">
<CookieBanner />
+61
View File
@@ -26,6 +26,67 @@ const LogOut = (props) => {
<div>
<Head>
<title>{t("common:service-name")}</title>
<>
<link
rel="canonical"
href={t("common:gov-wales-link") + router.asPath}
/>
<meta
key="og:locale"
property="og:locale"
content={router.locale}
/>
{/* If they have a Twitter Handle, include the meta details below */}
<meta
key="og:site_name"
property="og:site_name"
content={t("common:service-name")}
/>
<meta
key="twitter:site"
property="twitter:site"
content="@UKGovWales"
/>
<meta
name="description"
content={t("common:service-description")}
/>
<meta
property="og:site_name"
content={t("common:gov-wales-label")}
/>
<meta
property="og:title"
content={t("search:page-title")}
/>
<meta
property="og:description"
content={t("common:service-description")}
/>
<meta property="og:type" content="website" />
<meta
property="og:url"
content={t("common:gov-wales-link")}
/>
<meta
property="og:image"
content="https://gov.wales/themes/custom/govwales/images/content/og-global-1200.png"
/>
<meta name="twitter:card" content="summary" />
<meta
name="twitter:title"
content={t("common:gov-wales-label")}
/>
<meta
name="twitter:url"
content={t("common:gov-wales-link") + router.asPath}
/>
<meta
name="twitter:image"
content="https://gov.wales/themes/custom/govwales/images/content/og-global-120.png"
/>
</>
</Head>
<div id="page_wrapper">
<CookieBanner />
+2 -50
View File
@@ -16,21 +16,13 @@ import useTranslation from "next-translate/useTranslation";
import jsonpath from "jsonpath";
import data from "../../data/collections.json";
import { getSearchDetails } from "../../components/utils";
import { setSearch, getSearchObj } from "../../store/search/action";
import {
setSearchResults,
setSearchDetails,
setDocumentDetails,
setDocumentHistory,
getSearchResultsObj,
} from "../../store/searchOutput/action";
import {
getAdvancedSearch,
getBasicSearchDetails,
getSearchDocumentDetails,
getSearchDocumentHistory,
getSASToken,
} from "../../actions";
import { getAdvancedSearch, getSASToken } from "../../actions";
const Home = (props) => {
const { footerLinks, pages } = props;
@@ -83,46 +75,6 @@ export const getServerSideProps = wrapper.getServerSideProps(
}
);
const getFormCollection = (formtype) => {
const collectionName = jsonpath.query(
data,
"$..[?(@.LogicalName=='" + formtype + "')].LogicalCollectionName"
);
//console.log(collectionName[0]);
return collectionName[0];
};
const getSearchDetails = (token, searchResultsObj) => {
//console.log(searchResultsObj);
let detailsArr = [];
//console.log("searcg results", searchResultsObj);
searchResultsObj = searchResultsObj.value;
const detailsObj = searchResultsObj.map((searchDetail, index) => {
if (searchDetail.pinswg_appealcasetype == null) {
console.log(searchDetail.ticketnumber);
} else {
detailsArr.push(
getBasicSearchDetails(
token,
getFormCollection(
"pinswg_" +
searchDetail[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
]
.replace(/(\band|[\s\-\+\(\)\,\&])/g, "")
.toLowerCase()
.slice(0, 39)
),
searchDetail.ticketnumber
)
);
}
});
//console.log(detailsArr);
return Promise.all(detailsArr);
};
const mapStateToProps = (state) => {
return {
currentView: state.currentView,
+61
View File
@@ -62,6 +62,67 @@ const Home = (props) => {
<title>
{t("myportal:page-title")} - {t("common:service-name")}
</title>
<>
<link
rel="canonical"
href={t("common:gov-wales-link") + router.asPath}
/>
<meta
key="og:locale"
property="og:locale"
content={router.locale}
/>
{/* If they have a Twitter Handle, include the meta details below */}
<meta
key="og:site_name"
property="og:site_name"
content={t("common:service-name")}
/>
<meta
key="twitter:site"
property="twitter:site"
content="@UKGovWales"
/>
<meta
name="description"
content={t("common:service-description")}
/>
<meta
property="og:site_name"
content={t("common:gov-wales-label")}
/>
<meta
property="og:title"
content={t("myportal:page-title")}
/>
<meta
property="og:description"
content={t("common:service-description")}
/>
<meta property="og:type" content="website" />
<meta
property="og:url"
content={t("common:gov-wales-link")}
/>
<meta
property="og:image"
content="https://gov.wales/themes/custom/govwales/images/content/og-global-1200.png"
/>
<meta name="twitter:card" content="summary" />
<meta
name="twitter:title"
content={t("common:gov-wales-label")}
/>
<meta
name="twitter:url"
content={t("common:gov-wales-link") + router.asPath}
/>
<meta
name="twitter:image"
content="https://gov.wales/themes/custom/govwales/images/content/og-global-120.png"
/>
</>
</Head>
<div id="page_wrapper">
<CookieBanner />
+1 -50
View File
@@ -16,6 +16,7 @@ import useTranslation from "next-translate/useTranslation";
import jsonpath from "jsonpath";
import data from "../../data/collections.json";
import { getSearchDetails } from "../../components/utils";
import { setSearch, getSearchObj } from "../../store/search/action";
import {
setSearchResults,
@@ -89,62 +90,12 @@ export const getServerSideProps = wrapper.getServerSideProps(
searchResultsObj
);
// const searchDocumentResultsObj = await getDocumentDetails(
// token,
// searchResultsObj
// );
// const searchDocumentHistoryObj = await getDocumentHistory(
// token,
// searchDocumentResultsObj
// );
// console.log(searchDocumentHistoryObj);
store.dispatch(setSearchResults(searchResultsObj));
store.dispatch(setSearchDetails(searchDetailsObj));
store.dispatch(setSearch(query.q));
}
);
const getFormCollection = (formtype) => {
const collectionName = jsonpath.query(
data,
"$..[?(@.LogicalName=='" + formtype + "')].LogicalCollectionName"
);
//console.log(collectionName[0]);
return collectionName[0];
};
const getSearchDetails = (token, searchResultsObj) => {
//console.log(searchResultsObj);
let detailsArr = [];
searchResultsObj = searchResultsObj.value;
const detailsObj = searchResultsObj.map((searchDetail, index) => {
if (searchDetail.pinswg_appealcasetype == null) {
console.log(searchDetail.ticketnumber);
} else {
detailsArr.push(
getBasicSearchDetails(
token,
getFormCollection(
"pinswg_" +
searchDetail[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
]
.replace(/(\band|[\s\-\+\(\)\,\&])/g, "")
.toLowerCase()
.slice(0, 39)
),
searchDetail.ticketnumber
)
);
}
});
//console.log(detailsArr);
return Promise.all(detailsArr);
};
const mapStateToProps = (state) => {
return {
currentView: state.currentView,
+61
View File
@@ -206,6 +206,67 @@ let Home = (props) => {
<title>
{t("newappeal:page-title")} - {t("common:service-name")}
</title>
<>
<link
rel="canonical"
href={t("common:gov-wales-link") + router.asPath}
/>
<meta
key="og:locale"
property="og:locale"
content={router.locale}
/>
{/* If they have a Twitter Handle, include the meta details below */}
<meta
key="og:site_name"
property="og:site_name"
content={t("common:service-name")}
/>
<meta
key="twitter:site"
property="twitter:site"
content="@UKGovWales"
/>
<meta
name="description"
content={t("common:service-description")}
/>
<meta
property="og:site_name"
content={t("common:gov-wales-label")}
/>
<meta
property="og:title"
content={t("newappeal:page-title")}
/>
<meta
property="og:description"
content={t("common:service-description")}
/>
<meta property="og:type" content="website" />
<meta
property="og:url"
content={t("common:gov-wales-link")}
/>
<meta
property="og:image"
content="https://gov.wales/themes/custom/govwales/images/content/og-global-1200.png"
/>
<meta name="twitter:card" content="summary" />
<meta
name="twitter:title"
content={t("common:gov-wales-label")}
/>
<meta
name="twitter:url"
content={t("common:gov-wales-link") + router.asPath}
/>
<meta
name="twitter:image"
content="https://gov.wales/themes/custom/govwales/images/content/og-global-120.png"
/>
</>
</Head>
<div id="page_wrapper">
<CookieBanner />
+61
View File
@@ -54,6 +54,67 @@ const Home = (props) => {
<title>
{t("newappeal:page-title")} - {t("common:service-name")}
</title>
<>
<link
rel="canonical"
href={t("common:gov-wales-link") + router.asPath}
/>
<meta
key="og:locale"
property="og:locale"
content={router.locale}
/>
{/* If they have a Twitter Handle, include the meta details below */}
<meta
key="og:site_name"
property="og:site_name"
content={t("common:service-name")}
/>
<meta
key="twitter:site"
property="twitter:site"
content="@UKGovWales"
/>
<meta
name="description"
content={t("common:service-description")}
/>
<meta
property="og:site_name"
content={t("common:gov-wales-label")}
/>
<meta
property="og:title"
content={t("newappeal:page-title")}
/>
<meta
property="og:description"
content={t("common:service-description")}
/>
<meta property="og:type" content="website" />
<meta
property="og:url"
content={t("common:gov-wales-link")}
/>
<meta
property="og:image"
content="https://gov.wales/themes/custom/govwales/images/content/og-global-1200.png"
/>
<meta name="twitter:card" content="summary" />
<meta
name="twitter:title"
content={t("common:gov-wales-label")}
/>
<meta
name="twitter:url"
content={t("common:gov-wales-link") + router.asPath}
/>
<meta
name="twitter:image"
content="https://gov.wales/themes/custom/govwales/images/content/og-global-120.png"
/>
</>
</Head>
<div id="page_wrapper">
<CookieBanner />
+58
View File
@@ -29,6 +29,64 @@ const Home = (props) => {
<title>
{t("case:page-title")} - {t("common:service-name")}
</title>
<>
<link
rel="canonical"
href={t("common:gov-wales-link") + router.asPath}
/>
<meta
key="og:locale"
property="og:locale"
content={router.locale}
/>
{/* If they have a Twitter Handle, include the meta details below */}
<meta
key="og:site_name"
property="og:site_name"
content={t("common:service-name")}
/>
<meta
key="twitter:site"
property="twitter:site"
content="@UKGovWales"
/>
<meta
name="description"
content={t("common:service-description")}
/>
<meta
property="og:site_name"
content={t("common:gov-wales-label")}
/>
<meta property="og:title" content={t("case:page-title")} />
<meta
property="og:description"
content={t("common:service-description")}
/>
<meta property="og:type" content="website" />
<meta
property="og:url"
content={t("common:gov-wales-link")}
/>
<meta
property="og:image"
content="https://gov.wales/themes/custom/govwales/images/content/og-global-1200.png"
/>
<meta name="twitter:card" content="summary" />
<meta
name="twitter:title"
content={t("common:gov-wales-label")}
/>
<meta
name="twitter:url"
content={t("common:gov-wales-link") + router.asPath}
/>
<meta
name="twitter:image"
content="https://gov.wales/themes/custom/govwales/images/content/og-global-120.png"
/>
</>
</Head>
<div id="page_wrapper">
<CookieBanner />
+62 -76
View File
@@ -22,6 +22,7 @@ import {
getSearchResultsObj,
} from "../store/searchOutput/action";
import { getBasicSearch, getBasicSearchDetails, getSASToken } from "../actions";
import { getSearchDetails } from "../components/utils";
const Home = (props) => {
const { footerLinks, pages } = props;
@@ -37,6 +38,67 @@ const Home = (props) => {
<title>
{t("search:page-title")} - {t("common:service-name")}
</title>
<>
<link
rel="canonical"
href={t("common:gov-wales-link") + router.asPath}
/>
<meta
key="og:locale"
property="og:locale"
content={router.locale}
/>
{/* If they have a Twitter Handle, include the meta details below */}
<meta
key="og:site_name"
property="og:site_name"
content={t("common:service-name")}
/>
<meta
key="twitter:site"
property="twitter:site"
content="@UKGovWales"
/>
<meta
name="description"
content={t("common:service-description")}
/>
<meta
property="og:site_name"
content={t("common:gov-wales-label")}
/>
<meta
property="og:title"
content={t("search:page-title")}
/>
<meta
property="og:description"
content={t("common:service-description")}
/>
<meta property="og:type" content="website" />
<meta
property="og:url"
content={t("common:gov-wales-link")}
/>
<meta
property="og:image"
content="https://gov.wales/themes/custom/govwales/images/content/og-global-1200.png"
/>
<meta name="twitter:card" content="summary" />
<meta
name="twitter:title"
content={t("common:gov-wales-label")}
/>
<meta
name="twitter:url"
content={t("common:gov-wales-link") + router.asPath}
/>
<meta
name="twitter:image"
content="https://gov.wales/themes/custom/govwales/images/content/og-global-120.png"
/>
</>
</Head>
<div id="page_wrapper">
<CookieBanner />
@@ -85,82 +147,6 @@ export const getServerSideProps = wrapper.getServerSideProps(
}
);
const getFormCollection = (formtype) => {
const collectionName = jsonpath.query(
data,
"$..[?(@.LogicalName=='" + formtype + "')]"
);
//console.log(collectionName[0]);
return collectionName[0];
};
const getSearchDetails = (token, searchResultsObj) => {
//console.log(searchResultsObj);
let detailsArr = [];
//console.log("search results", searchResultsObj);
searchResultsObj = searchResultsObj.value;
const detailsObj = searchResultsObj.map((searchDetail, index) => {
//console.log(searchDetail);
// console.log(
// "the collect",
// getFormCollection(
// "pinswg_" +
// searchDetail[
// "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
// ]
// .replace(/(\band|[\s\-\+\(\)\,\&])/g, "")
// .toLowerCase()
// .slice(0, 39)
// )
// );
if (searchDetail.pinswg_appealcasetype == null) {
console.log(searchDetail.title);
} else {
// console.log(
// "appealtype collection name",
// searchDetail[
// "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
// ],
// "pinswg_" +
// searchDetail[
// "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
// ]
// .replace(/(\band|[\s\-\+\(\)\,\&])/g, "")
// .toLowerCase()
// .slice(0, 39),
// searchDetail.title,
// searchDetail.ticketnumber,
// searchDetail.incidentid
// );
let formMeta = getFormCollection(
"pinswg_" +
searchDetail[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
]
.replace(/(\band|[\s\-\+\(\)\,\&])/g, "")
.toLowerCase()
.slice(0, 39)
);
detailsArr.push(
getBasicSearchDetails(
token,
formMeta.LogicalCollectionName,
searchDetail.title,
formMeta.PrimaryIdAttribute,
searchDetail.incidentid
)
);
}
});
//console.log(detailsArr);
return Promise.all(detailsArr);
};
const mapStateToProps = (state) => {
return {
currentView: state.currentView,
+61
View File
@@ -35,6 +35,67 @@ const Home = (props) => {
<title>
{t("search:page-title")} - {t("common:service-name")}
</title>
<>
<link
rel="canonical"
href={t("common:gov-wales-link") + router.asPath}
/>
<meta
key="og:locale"
property="og:locale"
content={router.locale}
/>
{/* If they have a Twitter Handle, include the meta details below */}
<meta
key="og:site_name"
property="og:site_name"
content={t("common:service-name")}
/>
<meta
key="twitter:site"
property="twitter:site"
content="@UKGovWales"
/>
<meta
name="description"
content={t("common:service-description")}
/>
<meta
property="og:site_name"
content={t("common:gov-wales-label")}
/>
<meta
property="og:title"
content={t("search:page-title")}
/>
<meta
property="og:description"
content={t("common:service-description")}
/>
<meta property="og:type" content="website" />
<meta
property="og:url"
content={t("common:gov-wales-link")}
/>
<meta
property="og:image"
content="https://gov.wales/themes/custom/govwales/images/content/og-global-1200.png"
/>
<meta name="twitter:card" content="summary" />
<meta
name="twitter:title"
content={t("common:gov-wales-label")}
/>
<meta
name="twitter:url"
content={t("common:gov-wales-link") + router.asPath}
/>
<meta
name="twitter:image"
content="https://gov.wales/themes/custom/govwales/images/content/og-global-120.png"
/>
</>
</Head>
<div id="page_wrapper">
<CookieBanner />