fix (temp): wrap integrations before load in try/catch, fix render banner guard

This commit is contained in:
Scott Wilson
2025-02-12 20:35:00 -08:00
parent e88ce49463
commit 2d16f5f258
3 changed files with 37 additions and 28 deletions
@@ -57,6 +57,10 @@ export const ProjectPermissionCan: FunctionComponent<Props<ProjectPermissionSet>
const finalChild =
typeof children === "function" ? children(isAllowed, ability as any) : children;
if (!isAllowed && renderGuardBanner) {
return <ProjectPermissionGuardBanner />;
}
if (!isAllowed && passThrough) {
return <Tooltip content={label}>{finalChild}</Tooltip>;
}
@@ -65,10 +69,6 @@ export const ProjectPermissionCan: FunctionComponent<Props<ProjectPermissionSet>
return <Tooltip content={allowedLabel}>{finalChild}</Tooltip>;
}
if (!isAllowed && renderGuardBanner) {
return <ProjectPermissionGuardBanner />;
}
if (!isAllowed) return null;
return finalChild;