Replace portal title with entity name
Store a short entity name instead of the full home heading so orgs can brand portals for sub-entities. Restore hero i18n composition and keep the English document title composed from the entity name. Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
@@ -233,7 +233,7 @@ export function OrganizationSidebar({
|
||||
: (
|
||||
<div className="size-24 rounded-2xl border border-border-mid shadow-mid bg-level-1" />
|
||||
)}
|
||||
<h1 className="text-2xl mt-6">{compliancePortal.title}</h1>
|
||||
<h1 className="text-2xl mt-6">{compliancePortal.entityName}</h1>
|
||||
<p className="text-sm text-txt-secondary mt-1">
|
||||
{compliancePortal.description}
|
||||
</p>
|
||||
|
||||
@@ -24,7 +24,7 @@ import { CompliancePortalContext } from "#/providers/CompliancePortalProvider";
|
||||
|
||||
export function useCompliancePortal(): {
|
||||
id: string;
|
||||
title: string;
|
||||
entityName: string;
|
||||
} {
|
||||
const context = useContext(CompliancePortalContext);
|
||||
if (!context) {
|
||||
|
||||
@@ -47,7 +47,7 @@ export const ndaPageQuery = graphql`
|
||||
id
|
||||
}
|
||||
currentCompliancePortal @required(action: THROW) {
|
||||
title
|
||||
entityName
|
||||
nonDisclosureAgreement {
|
||||
fileName
|
||||
fileUrl
|
||||
@@ -244,7 +244,7 @@ export function NDAPage(props: {
|
||||
__(
|
||||
"%s requires you to sign an NDA before accessing compliance documents.",
|
||||
),
|
||||
compliancePortal.title,
|
||||
compliancePortal.entityName,
|
||||
)}
|
||||
</p>
|
||||
{isMobile && nda?.fileUrl && (
|
||||
|
||||
@@ -107,7 +107,7 @@ export function OverviewPage() {
|
||||
url={getCompliancePortalUrl("documents")}
|
||||
/>
|
||||
<Subprocessors
|
||||
title={compliancePortal.title}
|
||||
title={compliancePortal.entityName}
|
||||
subprocessors={fragment.subprocessors.edges}
|
||||
url={getCompliancePortalUrl("subprocessors")}
|
||||
/>
|
||||
|
||||
@@ -45,7 +45,7 @@ export function SubprocessorsPage({ queryRef }: Props) {
|
||||
<p className="text-sm text-txt-secondary mb-4">
|
||||
{sprintf(
|
||||
__("Third-party subprocessors %s work with:"),
|
||||
data.currentCompliancePortal?.title ?? "",
|
||||
data.currentCompliancePortal?.entityName ?? "",
|
||||
)}
|
||||
</p>
|
||||
<Rows>
|
||||
|
||||
@@ -31,7 +31,7 @@ import type { ConnectPageQuery } from "./__generated__/ConnectPageQuery.graphql"
|
||||
export const connectPageQuery = graphql`
|
||||
query ConnectPageQuery {
|
||||
currentCompliancePortal @required(action: THROW) {
|
||||
title
|
||||
entityName
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -45,10 +45,10 @@ export function ConnectPage(props: {
|
||||
const safeContinueUrl = useSafeContinueUrl();
|
||||
|
||||
const {
|
||||
currentCompliancePortal: { title },
|
||||
currentCompliancePortal: { entityName },
|
||||
} = usePreloadedQuery<ConnectPageQuery>(connectPageQuery, queryRef);
|
||||
|
||||
usePageTitle(__(`Connect to ${title}'s Compliance Page`));
|
||||
usePageTitle(__(`Connect to ${entityName}'s Compliance Page`));
|
||||
|
||||
const initiateURL = new URL("/initiate", window.location.origin);
|
||||
initiateURL.searchParams.set("continue", safeContinueUrl.toString());
|
||||
@@ -57,7 +57,7 @@ export function ConnectPage(props: {
|
||||
<div className="space-y-6 w-full max-w-md mx-auto pt-8">
|
||||
<div className="space-y-2 text-center">
|
||||
<h1 className="text-3xl font-bold">
|
||||
{__(`Connect to ${title}'s Compliance Page`)}
|
||||
{__(`Connect to ${entityName}'s Compliance Page`)}
|
||||
</h1>
|
||||
<p className="text-txt-tertiary">
|
||||
{__(
|
||||
|
||||
@@ -31,7 +31,7 @@ export const currentCompliancePortalGraphQuery = graphql`
|
||||
currentCompliancePortal @required(action: THROW) {
|
||||
id
|
||||
slug
|
||||
title
|
||||
entityName
|
||||
description
|
||||
websiteUrl
|
||||
email
|
||||
@@ -120,6 +120,7 @@ export const currentTrustSubprocessorsQuery = graphql`
|
||||
query CompliancePortalGraphCurrentSubprocessorsQuery {
|
||||
currentCompliancePortal {
|
||||
id
|
||||
entityName
|
||||
subprocessors(first: 50) {
|
||||
edges {
|
||||
node {
|
||||
|
||||
Reference in New Issue
Block a user