Restore TrustCenter reference hooks in console

Keep GraphQL-aligned TrustCenterReferenceGraph naming, drop the
unused domain redirect route, and tighten related compliance
page UI review nits around magic-link navigation and links.

Signed-off-by: Bryan Frimin <bryan@probo.com>
This commit is contained in:
Bryan Frimin
2026-07-17 12:29:28 +02:00
parent 802a36bbf4
commit 89f999d55c
14 changed files with 49 additions and 66 deletions

View File

@@ -27,8 +27,6 @@ import { useTranslation } from "react-i18next";
import { graphql, useFragment } from "react-relay";
import { Link as RouterLink, useLocation } from "react-router";
import { buildRequestAllContinueUrl } from "#/lib/auth/continueUrl";
import type { TopBar_query$key } from "./__generated__/TopBar_query.graphql";
import { TOP_BAR_NAV_ITEMS } from "./navItems";
import { TopBarMobileNav } from "./TopBarMobileNav";
@@ -59,7 +57,9 @@ function isActive(pathname: string, to: string): boolean {
export function TopBar({ queryKey }: TopBarProps) {
const { t } = useTranslation();
const data = useFragment(topBarFragment, queryKey);
const { pathname } = useLocation();
const location = useLocation();
const { pathname } = location;
const { currentTrustCenter } = data;
const title = currentTrustCenter.title;
const logoUrl = currentTrustCenter.themedLogoUrl ?? undefined;
@@ -116,7 +116,7 @@ export function TopBar({ queryKey }: TopBarProps) {
);
initiateURL.searchParams.set(
"continue",
buildRequestAllContinueUrl(),
location.pathname + location.search + location.hash,
);
window.location.href = initiateURL.toString();
}}