Address greptile suggestions

This commit is contained in:
Tuan Dang
2025-04-10 16:45:24 -07:00
parent 77dd768a38
commit 264177638f
14 changed files with 48 additions and 214 deletions
@@ -152,7 +152,7 @@ export const SshHostModal = ({ popUp, handlePopUpToggle }: Props) => {
} catch (err) {
console.error(err);
createNotification({
text: "Failed to add SSH host",
text: `Failed to ${sshHost ? "update" : "add"} SSH host`,
type: "error"
});
}
@@ -206,7 +206,7 @@ export const SshHostModal = ({ popUp, handlePopUpToggle }: Props) => {
errorText={error?.message}
isRequired
>
<Input {...field} placeholder="host.example.com" />
<Input {...field} placeholder="8h" />
</FormControl>
)}
/>
@@ -328,7 +328,7 @@ export const SshHostModal = ({ popUp, handlePopUpToggle }: Props) => {
{(value.length === 0 ? [""] : value).map(
(principal: string, principalIndex: number) => (
<div
key={`${metadataFieldId}-principal-${principal}`}
key={`${metadataFieldId}-principal-${principal || principalIndex}`}
className="flex items-center space-x-2"
>
<div className="flex-1">