Fix compliance update display

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2026-03-11 18:26:54 +01:00
parent 5e75dd7f91
commit 5372404a12
2 changed files with 22 additions and 8 deletions

View File

@@ -16,6 +16,7 @@ export function MainSkeleton() {
<TabLink to={getTrustCenterUrl("subprocessors")}>
{__("Subprocessors")}
</TabLink>
<TabLink to={getTrustCenterUrl("updates")}>{__("Updates")}</TabLink>
</Tabs>
<TabSkeleton />
</main>

View File

@@ -4,6 +4,7 @@ import { useState } from "react";
import { type PreloadedQuery, usePreloadedQuery } from "react-relay";
import { graphql } from "relay-runtime";
import { Rows } from "#/components/Rows";
import type { UpdatesPageQuery } from "#/pages/__generated__/UpdatesPageQuery.graphql";
export const currentTrustUpdatesQuery = graphql`
@@ -41,14 +42,26 @@ export function UpdatesPage({ queryRef }: Props) {
return (
<div>
<h2 className="font-medium mb-1">{__("Updates")}</h2>
<p className="text-sm text-txt-secondary mb-4">
{__("Latest compliance and security updates:")}
</p>
<div className="space-y-0">
{items.map(item => (
<UpdateItem key={item.id} item={item} />
))}
</div>
{items.length === 0
? (
<Rows>
<div className="text-sm text-txt-tertiary text-center py-5">
{__("No updates have been published yet.")}
</div>
</Rows>
)
: (
<>
<p className="text-sm text-txt-secondary mb-4">
{__("Latest compliance and security updates")}
</p>
<div className="space-y-0">
{items.map(item => (
<UpdateItem key={item.id} item={item} />
))}
</div>
</>
)}
</div>
);
}