Refactor breadcrumbs to use factory-based route renderers

This commit is contained in:
2026-04-09 12:08:36 +01:00
parent 5f6dde782a
commit 062cd23463
7 changed files with 813 additions and 382 deletions
+8
View File
@@ -21,8 +21,16 @@ export const resolveSearchResultsHref = ({
const routeState = normalizeRouteStateQuery(query);
const { viewAll, advanced, address, key } = routeState;
const base = hasSession ? "/myportal" : "";
const hasSearchQuery =
typeof query?.q === "string" && query.q.trim().length > 0;
if (fallbackToMyPortalWhenNoFlags && !viewAll && !advanced && !address) {
if (hasSearchQuery) {
return {
pathname: `${base}/searchresults`,
query
};
}
return {
pathname: "/myportal"
};