Fix trust center references tab permissions handling
Signed-off-by: Émile Ré <nemile.re@gmail.com>
This commit is contained in:
@@ -1,21 +1,17 @@
|
||||
import { useOutletContext } from "react-router";
|
||||
import { TrustCenterReferencesSection } from "/components/trustCenter/TrustCenterReferencesSection";
|
||||
|
||||
type ContextType = {
|
||||
organization: {
|
||||
trustCenter?: {
|
||||
id: string;
|
||||
} | null;
|
||||
};
|
||||
};
|
||||
import type { TrustCenterGraphQuery$data } from "/__generated__/core/TrustCenterGraphQuery.graphql";
|
||||
|
||||
export default function TrustCenterReferencesTab() {
|
||||
const { organization } = useOutletContext<ContextType>();
|
||||
const { organization } = useOutletContext<TrustCenterGraphQuery$data>();
|
||||
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
{organization.trustCenter?.id && (
|
||||
<TrustCenterReferencesSection trustCenterId={organization.trustCenter.id} />
|
||||
<TrustCenterReferencesSection
|
||||
trustCenterId={organization.trustCenter.id}
|
||||
canCreateReference={!!organization.trustCenter.canCreateReference}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user