Skip to content

Commit

Permalink
fix: flashing modal display
Browse files Browse the repository at this point in the history
  • Loading branch information
benwaples committed Nov 27, 2024
1 parent 1dd3eaf commit 794e279
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { Dialog, DialogTitle } from '@mui/material';
import { SSOProvider, UpsertOIDCProviderRequest } from 'js-client-library';
import UpsertOIDCProviderForm from './UpsertOIDCProviderForm';

const UpsertSAMLProviderDialog: React.FC<{
const UpsertOIDCProviderDialog: React.FC<{
open: boolean;
error?: string;
oldSSOProvider?: SSOProvider;
Expand Down Expand Up @@ -46,4 +46,4 @@ const UpsertSAMLProviderDialog: React.FC<{
);
};

export default UpsertSAMLProviderDialog;
export default UpsertOIDCProviderDialog;
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import { faSearch } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { Box, Grid, Paper, TextField, Typography, useTheme } from '@mui/material';
import { SSOProvider, UpsertSAMLProviderFormInputs, UpsertOIDCProviderRequest } from 'js-client-library';
import { SSOProvider, UpsertOIDCProviderRequest, UpsertSAMLProviderFormInputs } from 'js-client-library';
import { ChangeEvent, FC, useMemo, useState } from 'react';
import { useMutation, useQuery } from 'react-query';
import {
Expand Down Expand Up @@ -117,7 +117,7 @@ const SSOConfiguration: FC = () => {
const closeDialog = () => {
setUpsertProviderError('');
setDialogOpen('');
setSSOProviderIdToDeleteOrUpdate(undefined);
setTimeout(() => setSSOProviderIdToDeleteOrUpdate(undefined), 500);
};

const onClickSSOProvider = (ssoProviderId: SSOProvider['id']) => {
Expand Down Expand Up @@ -290,14 +290,14 @@ const SSOConfiguration: FC = () => {
</PageWithTitle>
<UpsertSAMLProviderDialog
open={dialogOpen === 'SAML'}
oldSSOProvider={dialogOpen === 'SAML' ? selectedSSOProviderToUpdate : undefined}
oldSSOProvider={selectedSSOProviderToUpdate}
error={upsertProviderError}
onClose={closeDialog}
onSubmit={upsertSAMLProvider}
/>
<UpsertOIDCProviderDialog
open={dialogOpen === 'OIDC'}
oldSSOProvider={dialogOpen === 'OIDC' ? selectedSSOProviderToUpdate : undefined}
oldSSOProvider={selectedSSOProviderToUpdate}
error={upsertProviderError}
onClose={closeDialog}
onSubmit={upsertOIDCProvider}
Expand Down

0 comments on commit 794e279

Please sign in to comment.