Merged PR 839: added logic for cas- and dns/ records

added logic for cas- and dns/ records

Related work items: #7569
This commit is contained in:
Robert Bond
2022-03-29 08:26:07 +00:00
3 changed files with 13 additions and 7 deletions
@@ -25,13 +25,15 @@ const LatestApplications = (props) => {
<Link
href={
"/dns/" +
dnsList[key].title
.split(" - ")[1]
.split(" ")
.join("-")
(dnsList[key].title.indexOf(" - ") < 0
? dnsList[key].title
: dnsList[key].title
.split(" - ")[1]
.split(" ")
.join("-"))
}
>
<a href="">{dnsList[key].title}</a>
<a>{dnsList[key].title}</a>
</Link>
</li>
);
+1 -1
View File
@@ -70,7 +70,7 @@ const TitleContent = (props) => {
"/dns/" +
(value.indexOf(" - ") > 0
? value.split(" - ")[1].split(" ").join("-")
: "")
: value)
}
>
<a className="govuk-button govuk-!-margin-bottom-0 ">
+5 -1
View File
@@ -93,7 +93,11 @@ export const getServerSideProps = wrapper.getServerSideProps(
console.log("the query", query.developmentName);
let loggedInUser = cookies.pinsUser;
let developmentQuery = query.developmentName.split("-").join(" ");
let developmentQuery =
query.developmentName.indexOf("CAS-") == 0
? query.developmentName
: query.developmentName.split("-").join(" ");
console.log(developmentQuery);
const searchResultsObj = await getBasicDNSURLSearch(developmentQuery);
const searchDetailsObj = await getSearchDetails(searchResultsObj);