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">
|
||||
<TabLink to="/overview">{__("Overview")}</TabLink>
|
||||
<TabLink to="/documents">{__("Documents")}</TabLink>
|
||||
<TabLink to="/subprocessors">{__("Subprocessors")}</TabLink>
|
||||
{trustCenter.vendorInfo.totalCount > 0
|
||||
&& <TabLink to="/subprocessors">{__("Subprocessors")}</TabLink>}
|
||||
</Tabs>
|
||||
<Outlet context={{ trustCenter }} />
|
||||
</main>
|
||||
|
||||
@@ -23,7 +23,7 @@ export const currentTrustGraphQuery = graphql`
|
||||
headquarterAddress
|
||||
}
|
||||
...OverviewPageFragment
|
||||
vendors(first: 0) {
|
||||
vendorInfo: vendors(first: 0) {
|
||||
totalCount
|
||||
}
|
||||
audits(first: 50) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<c77a16a1b448cd1630bdf025193ad94f>>
|
||||
* @generated SignedSource<<3dbd64be3b8852cb9bfca995f648dd65>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -35,6 +35,9 @@ export type TrustGraphCurrentQuery$data = {
|
||||
readonly websiteUrl: string | null | undefined;
|
||||
};
|
||||
readonly slug: string;
|
||||
readonly vendorInfo: {
|
||||
readonly totalCount: number;
|
||||
};
|
||||
readonly " $fragmentSpreads": FragmentRefs<"OverviewPageFragment">;
|
||||
} | null | undefined;
|
||||
readonly viewer: {
|
||||
@@ -139,35 +142,59 @@ v12 = {
|
||||
"name": "headquarterAddress",
|
||||
"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",
|
||||
"name": "first",
|
||||
"value": 50
|
||||
}
|
||||
],
|
||||
v14 = {
|
||||
v15 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "category",
|
||||
"storageKey": null
|
||||
},
|
||||
v15 = [
|
||||
v16 = [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "first",
|
||||
"value": 5
|
||||
}
|
||||
],
|
||||
v16 = {
|
||||
v17 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "isUserAuthorized",
|
||||
"storageKey": null
|
||||
},
|
||||
v17 = {
|
||||
v18 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
@@ -230,9 +257,10 @@ return {
|
||||
"kind": "FragmentSpread",
|
||||
"name": "OverviewPageFragment"
|
||||
},
|
||||
(v13/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v13/*: any*/),
|
||||
"args": (v14/*: any*/),
|
||||
"concreteType": "AuditConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "audits",
|
||||
@@ -410,7 +438,7 @@ return {
|
||||
"storageKey": null
|
||||
},
|
||||
(v8/*: any*/),
|
||||
(v14/*: any*/),
|
||||
(v15/*: any*/),
|
||||
(v10/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
@@ -430,7 +458,7 @@ return {
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v15/*: any*/),
|
||||
"args": (v16/*: any*/),
|
||||
"concreteType": "DocumentConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "documents",
|
||||
@@ -460,8 +488,8 @@ return {
|
||||
"name": "title",
|
||||
"storageKey": null
|
||||
},
|
||||
(v16/*: any*/),
|
||||
(v17/*: any*/),
|
||||
(v18/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -480,7 +508,7 @@ return {
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v15/*: any*/),
|
||||
"args": (v16/*: any*/),
|
||||
"concreteType": "TrustCenterFileConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "trustCenterFiles",
|
||||
@@ -503,10 +531,10 @@ return {
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
(v14/*: any*/),
|
||||
(v15/*: any*/),
|
||||
(v8/*: any*/),
|
||||
(v16/*: any*/),
|
||||
(v17/*: any*/)
|
||||
(v17/*: any*/),
|
||||
(v18/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
@@ -516,9 +544,10 @@ return {
|
||||
],
|
||||
"storageKey": "trustCenterFiles(first:5)"
|
||||
},
|
||||
(v13/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v13/*: any*/),
|
||||
"args": (v14/*: any*/),
|
||||
"concreteType": "AuditConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "audits",
|
||||
@@ -557,8 +586,8 @@ return {
|
||||
"name": "filename",
|
||||
"storageKey": null
|
||||
},
|
||||
(v16/*: any*/),
|
||||
(v17/*: any*/)
|
||||
(v17/*: any*/),
|
||||
(v18/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
@@ -604,16 +633,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "c76b7662b00ed20e82ed9333792e396b",
|
||||
"cacheID": "211acd806d18a69efb76df5c7e6822bc",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "TrustGraphCurrentQuery",
|
||||
"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;
|
||||
|
||||
Reference in New Issue
Block a user