misc: addressed review comments

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