adjusted logic to cater for viewl all path and dnsapplications
This commit is contained in:
@@ -326,6 +326,27 @@ const CaseSummary = (props) => {
|
||||
|
||||
const buildSearchHref = (router, session) => {
|
||||
const { va, adv, ads, key } = router.query;
|
||||
console.log(router);
|
||||
|
||||
const isDnsRoute =
|
||||
router.pathname === "/dns" ||
|
||||
router.pathname.startsWith("/dns/") ||
|
||||
router.pathname === "/myportal/dns" ||
|
||||
router.pathname.startsWith("/myportal/dns/");
|
||||
|
||||
const base = session ? "/myportal" : "";
|
||||
|
||||
if (!va && !adv && !ads) {
|
||||
return {
|
||||
pathname: "/myportal"
|
||||
};
|
||||
}
|
||||
|
||||
if (isDnsRoute) {
|
||||
return {
|
||||
pathname: `${base}/dnsapplications`
|
||||
};
|
||||
}
|
||||
|
||||
if (va === "true") {
|
||||
return {
|
||||
@@ -334,8 +355,6 @@ const CaseSummary = (props) => {
|
||||
};
|
||||
}
|
||||
|
||||
const base = session ? "/myportal" : "";
|
||||
|
||||
if (adv === "true") {
|
||||
return {
|
||||
pathname: `${base}/advancedsearchresults`,
|
||||
|
||||
Reference in New Issue
Block a user