Revise PR based on review

This commit is contained in:
Tuan Dang
2025-05-02 12:16:51 -07:00
parent 83df0850ce
commit 6a5748150a
12 changed files with 130 additions and 22 deletions
@@ -362,7 +362,10 @@ export const SshHostModal = ({ popUp, handlePopUpToggle }: Props) => {
const newValue = e.target.value;
const loginMappings = getValues("loginMappings");
const isDuplicate = loginMappings.some(
(mapping, index) => index !== i && mapping.loginUser === newValue
(mapping, index) =>
index !== i &&
mapping.loginUser === newValue &&
mapping.source === LoginMappingSource.HOST
);
if (isDuplicate) {