Skip to content

Commit

Permalink
remove confirm text input from update user role
Browse files Browse the repository at this point in the history
  • Loading branch information
nxtcoder19 committed Mar 13, 2024
1 parent b81429a commit 24c166c
Showing 1 changed file with 0 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
IMemberType,
mapRoleToDisplayName,
} from '~/console/routes/_main+/$account+/settings+/user-management/user-access-resource';
import { useState } from 'react';
import { IAccountContext } from '../../_layout';

type IDialog = IDialogBase<IMemberType>;
Expand All @@ -36,7 +35,6 @@ const Root = (props: IDialog) => {
const api = useConsoleApi();

const { account } = useOutletContext<IAccountContext>();
const [inputName, setInputName] = useState('');

const { values, handleChange, handleSubmit, isLoading } = useForm({
initialValues: isUpdate
Expand Down Expand Up @@ -117,23 +115,6 @@ const Root = (props: IDialog) => {
})}
</SelectPrimitive.Root>
</div>
{isUpdate && (
<div className="py-2xl">
<div>
Type in <b>confirm</b> to continue.
</div>
<div className="py-2xl">
<TextInput
value={inputName}
onChange={({ target }) => {
setInputName(target.value);
}}
// disabled={loading}
autoComplete="off"
/>
</div>
</div>
)}
</Popup.Content>
<Popup.Footer>
<Popup.Button closable content="Cancel" variant="basic" />
Expand All @@ -142,7 +123,6 @@ const Root = (props: IDialog) => {
type="submit"
content={isUpdate ? 'update' : 'Send invite'}
variant="primary"
disabled={isUpdate ? inputName !== 'confirm' : false}
/>
</Popup.Footer>
</Popup.Form>
Expand Down

0 comments on commit 24c166c

Please sign in to comment.