Use console layout for employee page

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2025-12-29 16:01:55 +01:00
parent 7d5476507f
commit 2abe362371
5 changed files with 15 additions and 423 deletions

View File

@@ -28,20 +28,18 @@ export const employeeDocumentsPageQuery = graphql`
export function EmployeeDocumentsPage(props: {
queryRef: PreloadedQuery<EmployeeDocumentsPageQuery>;
}) {
const { queryRef } = props;
const { __ } = useTranslate();
const organizationId = useOrganizationId();
const { queryRef } = props;
const {
viewer: {
signableDocuments: { edges: initialDocuments },
},
viewer: { signableDocuments },
} = usePreloadedQuery<EmployeeDocumentsPageQuery>(
employeeDocumentsPageQuery,
queryRef
);
const documents = initialDocuments.map((edge) => edge.node).filter(Boolean);
const documents = signableDocuments.edges.map((edge) => edge.node);
usePageTitle(__("Documents"));

View File

@@ -22,20 +22,18 @@ function EmployeeDocumentsPageLoader() {
}, [loadQuery, organizationId]);
if (!queryRef) {
return <PageSkeleton />;
return null;
}
return (
<Suspense fallback={<PageSkeleton />}>
<EmployeeDocumentsPage queryRef={queryRef} />
</Suspense>
);
return <EmployeeDocumentsPage queryRef={queryRef} />;
}
export default function () {
return (
<CoreRelayProvider>
<EmployeeDocumentsPageLoader />
<Suspense fallback={<PageSkeleton />}>
<EmployeeDocumentsPageLoader />
</Suspense>
</CoreRelayProvider>
);
}

View File

@@ -30,7 +30,7 @@ export function DomainSettingsPage(props: {
const { organization } = usePreloadedQuery<DomainSettingsPageQuery>(
domainSettingsPageQuery,
queryRef,
queryRef
);
if (organization.__typename !== "Organization") {
throw new Error("invalid type for node");
@@ -49,7 +49,7 @@ export function DomainSettingsPage(props: {
</h3>
<p className="text-txt-tertiary mb-4">
{__(
"Add your own domain to make your trust center more professional",
"Add your own domain to make your trust center more professional"
)}
</p>
<div className="flex justify-center">