diff --git a/src/Components/CreateImageWizard/steps/Users/component/UserInfo.tsx b/src/Components/CreateImageWizard/steps/Users/component/UserInfo.tsx index 712265d8..48b433cd 100644 --- a/src/Components/CreateImageWizard/steps/Users/component/UserInfo.tsx +++ b/src/Components/CreateImageWizard/steps/Users/component/UserInfo.tsx @@ -6,11 +6,9 @@ import { ExternalLinkAltIcon } from '@patternfly/react-icons'; import { GENERATING_SSH_KEY_PAIRS_URL } from '../../../../../constants'; import { useAppDispatch, useAppSelector } from '../../../../../store/hooks'; import { - selectUserConfirmPassword, selectUserNameByIndex, selectUserPasswordByIndex, selectUserSshKeyByIndex, - setUserConfirmPasswordByIndex, setUserNameByIndex, setUserPasswordByIndex, setUserSshKeyByIndex, @@ -23,8 +21,6 @@ const UserInfo = () => { const userName = useAppSelector(userNameSelector); const userPasswordSelector = selectUserPasswordByIndex(index); const userPassword = useAppSelector(userPasswordSelector); - const userConfirmPasswordSelector = selectUserConfirmPassword(index); - const userConfirmPassword = useAppSelector(userConfirmPasswordSelector); const userSshKeySelector = selectUserSshKeyByIndex(index); const userSshKey = useAppSelector(userSshKeySelector); @@ -42,15 +38,6 @@ const UserInfo = () => { dispatch(setUserPasswordByIndex({ index: index, password: value })); }; - const handleConfirmPasswordChange = ( - _event: React.FormEvent, - value: string - ) => { - dispatch( - setUserConfirmPasswordByIndex({ index: index, confirmPassword: value }) - ); - }; - const handleSshKeyChange = ( _event: React.FormEvent, value: string @@ -85,16 +72,6 @@ const UserInfo = () => { fieldName="userPassword" /> - - handleConfirmPasswordChange(_e, value)} - placeholder="Confirm Password" - stepValidation={stepValidation} - fieldName="userConfirmPassword" - /> - ; -} & { - confirmPassword: string; }; type UserPayload = { @@ -65,11 +63,6 @@ type UserSshKeyPayload = { sshKey: string; }; -type UserConfirmPasswordPayload = { - index: number; - confirmPassword: string; -}; - export type wizardState = { env: { serverUrl: string; @@ -380,11 +373,6 @@ export const selectUserPasswordByIndex = return state.wizard.users[userIndex]?.password; }; -export const selectUserConfirmPassword = - (userIndex: number) => (state: RootState) => { - return state.wizard.users[userIndex]?.confirmPassword; - }; - export const selectUserSshKeyByIndex = (userIndex: number) => (state: RootState) => { return state.wizard.users[userIndex]?.ssh_key; @@ -847,13 +835,6 @@ export const wizardSlice = createSlice({ ) => { state.users[action.payload.index].password = action.payload.password; }, - setUserConfirmPasswordByIndex: ( - state, - action: PayloadAction - ) => { - state.users[action.payload.index].confirmPassword = - action.payload.confirmPassword; - }, setUserSshKeyByIndex: (state, action: PayloadAction) => { state.users[action.payload.index].ssh_key = action.payload.sshKey; }, @@ -929,6 +910,5 @@ export const { setUserNameByIndex, setUserPasswordByIndex, setUserSshKeyByIndex, - setUserConfirmPasswordByIndex, } = wizardSlice.actions; export default wizardSlice.reducer;