Hide subprocessors tab when there's none to show
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -42,7 +42,8 @@ export function MainLayout(props: Props) {
|
|||||||
<Tabs className="mb-8">
|
<Tabs className="mb-8">
|
||||||
<TabLink to="/overview">{__("Overview")}</TabLink>
|
<TabLink to="/overview">{__("Overview")}</TabLink>
|
||||||
<TabLink to="/documents">{__("Documents")}</TabLink>
|
<TabLink to="/documents">{__("Documents")}</TabLink>
|
||||||
<TabLink to="/subprocessors">{__("Subprocessors")}</TabLink>
|
{trustCenter.vendorInfo.totalCount > 0
|
||||||
|
&& <TabLink to="/subprocessors">{__("Subprocessors")}</TabLink>}
|
||||||
</Tabs>
|
</Tabs>
|
||||||
<Outlet context={{ trustCenter }} />
|
<Outlet context={{ trustCenter }} />
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export const currentTrustGraphQuery = graphql`
|
|||||||
headquarterAddress
|
headquarterAddress
|
||||||
}
|
}
|
||||||
...OverviewPageFragment
|
...OverviewPageFragment
|
||||||
vendors(first: 0) {
|
vendorInfo: vendors(first: 0) {
|
||||||
totalCount
|
totalCount
|
||||||
}
|
}
|
||||||
audits(first: 50) {
|
audits(first: 50) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<c77a16a1b448cd1630bdf025193ad94f>>
|
* @generated SignedSource<<3dbd64be3b8852cb9bfca995f648dd65>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -35,6 +35,9 @@ export type TrustGraphCurrentQuery$data = {
|
|||||||
readonly websiteUrl: string | null | undefined;
|
readonly websiteUrl: string | null | undefined;
|
||||||
};
|
};
|
||||||
readonly slug: string;
|
readonly slug: string;
|
||||||
|
readonly vendorInfo: {
|
||||||
|
readonly totalCount: number;
|
||||||
|
};
|
||||||
readonly " $fragmentSpreads": FragmentRefs<"OverviewPageFragment">;
|
readonly " $fragmentSpreads": FragmentRefs<"OverviewPageFragment">;
|
||||||
} | null | undefined;
|
} | null | undefined;
|
||||||
readonly viewer: {
|
readonly viewer: {
|
||||||
@@ -139,35 +142,59 @@ v12 = {
|
|||||||
"name": "headquarterAddress",
|
"name": "headquarterAddress",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
v13 = [
|
v13 = {
|
||||||
|
"alias": "vendorInfo",
|
||||||
|
"args": [
|
||||||
|
{
|
||||||
|
"kind": "Literal",
|
||||||
|
"name": "first",
|
||||||
|
"value": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"concreteType": "VendorConnection",
|
||||||
|
"kind": "LinkedField",
|
||||||
|
"name": "vendors",
|
||||||
|
"plural": false,
|
||||||
|
"selections": [
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "totalCount",
|
||||||
|
"storageKey": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"storageKey": "vendors(first:0)"
|
||||||
|
},
|
||||||
|
v14 = [
|
||||||
{
|
{
|
||||||
"kind": "Literal",
|
"kind": "Literal",
|
||||||
"name": "first",
|
"name": "first",
|
||||||
"value": 50
|
"value": 50
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
v14 = {
|
v15 = {
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
"kind": "ScalarField",
|
"kind": "ScalarField",
|
||||||
"name": "category",
|
"name": "category",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
v15 = [
|
v16 = [
|
||||||
{
|
{
|
||||||
"kind": "Literal",
|
"kind": "Literal",
|
||||||
"name": "first",
|
"name": "first",
|
||||||
"value": 5
|
"value": 5
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
v16 = {
|
v17 = {
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
"kind": "ScalarField",
|
"kind": "ScalarField",
|
||||||
"name": "isUserAuthorized",
|
"name": "isUserAuthorized",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
v17 = {
|
v18 = {
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
"kind": "ScalarField",
|
"kind": "ScalarField",
|
||||||
@@ -230,9 +257,10 @@ return {
|
|||||||
"kind": "FragmentSpread",
|
"kind": "FragmentSpread",
|
||||||
"name": "OverviewPageFragment"
|
"name": "OverviewPageFragment"
|
||||||
},
|
},
|
||||||
|
(v13/*: any*/),
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v13/*: any*/),
|
"args": (v14/*: any*/),
|
||||||
"concreteType": "AuditConnection",
|
"concreteType": "AuditConnection",
|
||||||
"kind": "LinkedField",
|
"kind": "LinkedField",
|
||||||
"name": "audits",
|
"name": "audits",
|
||||||
@@ -410,7 +438,7 @@ return {
|
|||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v8/*: any*/),
|
(v8/*: any*/),
|
||||||
(v14/*: any*/),
|
(v15/*: any*/),
|
||||||
(v10/*: any*/),
|
(v10/*: any*/),
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
@@ -430,7 +458,7 @@ return {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v15/*: any*/),
|
"args": (v16/*: any*/),
|
||||||
"concreteType": "DocumentConnection",
|
"concreteType": "DocumentConnection",
|
||||||
"kind": "LinkedField",
|
"kind": "LinkedField",
|
||||||
"name": "documents",
|
"name": "documents",
|
||||||
@@ -460,8 +488,8 @@ return {
|
|||||||
"name": "title",
|
"name": "title",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v16/*: any*/),
|
|
||||||
(v17/*: any*/),
|
(v17/*: any*/),
|
||||||
|
(v18/*: any*/),
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -480,7 +508,7 @@ return {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v15/*: any*/),
|
"args": (v16/*: any*/),
|
||||||
"concreteType": "TrustCenterFileConnection",
|
"concreteType": "TrustCenterFileConnection",
|
||||||
"kind": "LinkedField",
|
"kind": "LinkedField",
|
||||||
"name": "trustCenterFiles",
|
"name": "trustCenterFiles",
|
||||||
@@ -503,10 +531,10 @@ return {
|
|||||||
"plural": false,
|
"plural": false,
|
||||||
"selections": [
|
"selections": [
|
||||||
(v2/*: any*/),
|
(v2/*: any*/),
|
||||||
(v14/*: any*/),
|
(v15/*: any*/),
|
||||||
(v8/*: any*/),
|
(v8/*: any*/),
|
||||||
(v16/*: any*/),
|
(v17/*: any*/),
|
||||||
(v17/*: any*/)
|
(v18/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
}
|
}
|
||||||
@@ -516,9 +544,10 @@ return {
|
|||||||
],
|
],
|
||||||
"storageKey": "trustCenterFiles(first:5)"
|
"storageKey": "trustCenterFiles(first:5)"
|
||||||
},
|
},
|
||||||
|
(v13/*: any*/),
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v13/*: any*/),
|
"args": (v14/*: any*/),
|
||||||
"concreteType": "AuditConnection",
|
"concreteType": "AuditConnection",
|
||||||
"kind": "LinkedField",
|
"kind": "LinkedField",
|
||||||
"name": "audits",
|
"name": "audits",
|
||||||
@@ -557,8 +586,8 @@ return {
|
|||||||
"name": "filename",
|
"name": "filename",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v16/*: any*/),
|
(v17/*: any*/),
|
||||||
(v17/*: any*/)
|
(v18/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
@@ -604,16 +633,16 @@ return {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"params": {
|
"params": {
|
||||||
"cacheID": "c76b7662b00ed20e82ed9333792e396b",
|
"cacheID": "211acd806d18a69efb76df5c7e6822bc",
|
||||||
"id": null,
|
"id": null,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"name": "TrustGraphCurrentQuery",
|
"name": "TrustGraphCurrentQuery",
|
||||||
"operationKind": "query",
|
"operationKind": "query",
|
||||||
"text": "query TrustGraphCurrentQuery {\n viewer {\n email\n fullName\n id\n }\n currentTrustCenter {\n id\n slug\n isViewerMember\n hasAcceptedNonDisclosureAgreement\n ndaFileName\n ndaFileUrl\n organization {\n name\n description\n websiteUrl\n logoUrl\n email\n headquarterAddress\n id\n }\n ...OverviewPageFragment\n audits(first: 50) {\n edges {\n node {\n id\n ...AuditRowFragment\n }\n }\n }\n }\n}\n\nfragment AuditRowFragment on Audit {\n report {\n id\n filename\n isUserAuthorized\n hasUserRequestedAccess\n }\n framework {\n id\n name\n lightLogoURL\n darkLogoURL\n }\n}\n\nfragment DocumentRowFragment on Document {\n id\n title\n isUserAuthorized\n hasUserRequestedAccess\n}\n\nfragment OverviewPageFragment on TrustCenter {\n references(first: 14) {\n edges {\n node {\n id\n name\n logoUrl\n websiteUrl\n }\n }\n }\n vendors(first: 3) {\n edges {\n node {\n id\n countries\n ...VendorRowFragment\n }\n }\n }\n documents(first: 5) {\n edges {\n node {\n id\n ...DocumentRowFragment\n documentType\n }\n }\n }\n trustCenterFiles(first: 5) {\n edges {\n node {\n id\n category\n ...TrustCenterFileRowFragment\n }\n }\n }\n}\n\nfragment TrustCenterFileRowFragment on TrustCenterFile {\n id\n name\n isUserAuthorized\n hasUserRequestedAccess\n}\n\nfragment VendorRowFragment on Vendor {\n id\n name\n category\n websiteUrl\n privacyPolicyUrl\n countries\n}\n"
|
"text": "query TrustGraphCurrentQuery {\n viewer {\n email\n fullName\n id\n }\n currentTrustCenter {\n id\n slug\n isViewerMember\n hasAcceptedNonDisclosureAgreement\n ndaFileName\n ndaFileUrl\n organization {\n name\n description\n websiteUrl\n logoUrl\n email\n headquarterAddress\n id\n }\n ...OverviewPageFragment\n vendorInfo: vendors(first: 0) {\n totalCount\n }\n audits(first: 50) {\n edges {\n node {\n id\n ...AuditRowFragment\n }\n }\n }\n }\n}\n\nfragment AuditRowFragment on Audit {\n report {\n id\n filename\n isUserAuthorized\n hasUserRequestedAccess\n }\n framework {\n id\n name\n lightLogoURL\n darkLogoURL\n }\n}\n\nfragment DocumentRowFragment on Document {\n id\n title\n isUserAuthorized\n hasUserRequestedAccess\n}\n\nfragment OverviewPageFragment on TrustCenter {\n references(first: 14) {\n edges {\n node {\n id\n name\n logoUrl\n websiteUrl\n }\n }\n }\n vendors(first: 3) {\n edges {\n node {\n id\n countries\n ...VendorRowFragment\n }\n }\n }\n documents(first: 5) {\n edges {\n node {\n id\n ...DocumentRowFragment\n documentType\n }\n }\n }\n trustCenterFiles(first: 5) {\n edges {\n node {\n id\n category\n ...TrustCenterFileRowFragment\n }\n }\n }\n}\n\nfragment TrustCenterFileRowFragment on TrustCenterFile {\n id\n name\n isUserAuthorized\n hasUserRequestedAccess\n}\n\nfragment VendorRowFragment on Vendor {\n id\n name\n category\n websiteUrl\n privacyPolicyUrl\n countries\n}\n"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
(node as any).hash = "e8ad7c480c3fac7346ea7d2be6ea5c9f";
|
(node as any).hash = "7623a958ac84c0615c8f4487ecda9224";
|
||||||
|
|
||||||
export default node;
|
export default node;
|
||||||
|
|||||||
Reference in New Issue
Block a user