added logic for cas- and dns/ records
This commit is contained in:
@@ -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>
|
||||
);
|
||||
|
||||
@@ -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 ">
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user