misc: addressed review comments

This commit is contained in:
Sheen Capadngan
2024-10-02 02:10:46 +08:00
parent 32f866f834
commit fdc62e21ef

View File

@@ -47,17 +47,13 @@ export const OrgOIDCSection = (): JSX.Element => {
});
} catch (err) {
console.error(err);
createNotification({
text: `Failed to ${value ? "enable" : "disable"} OIDC SSO`,
type: "error"
});
}
};
const handleEnforceOrgAuthToggle = async (value: boolean) => {
try {
if (!currentOrg?.id) return;
if (!subscription?.samlSSO) {
if (!subscription?.oidcSSO) {
handlePopUpOpen("upgradePlan");
return;
}
@@ -78,10 +74,7 @@ export const OrgOIDCSection = (): JSX.Element => {
window.close();
}
} catch (err) {
createNotification({
text: (err as { response: { data: { message: string } } }).response.data.message,
type: "error"
});
console.error(err);
}
};