Moved from useEffect to useMemo on PasswordGeneratorModal and remove it from secret-share

This commit is contained in:
carlosmonastyrski
2025-04-02 15:27:05 -03:00
parent 0088217fa9
commit d8313a161e
2 changed files with 38 additions and 41 deletions
@@ -6,15 +6,7 @@ import { zodResolver } from "@hookform/resolvers/zod";
import { z } from "zod";
import { createNotification } from "@app/components/notifications";
import {
Button,
FormControl,
IconButton,
Input,
PasswordGenerator,
Select,
SelectItem
} from "@app/components/v2";
import { Button, FormControl, IconButton, Input, Select, SelectItem } from "@app/components/v2";
import { useTimedReset } from "@app/hooks";
import { useCreatePublicSharedSecret, useCreateSharedSecret } from "@app/hooks/api";
import { SecretSharingAccessType } from "@app/hooks/api/secretSharing";
@@ -175,19 +167,16 @@ export const ShareSecretForm = ({
errorText={error?.message}
isOptional
>
<div className="flex items-center gap-2">
<Input
{...field}
placeholder="Password"
type="password"
autoComplete="new-password"
autoCorrect="off"
spellCheck="false"
aria-autocomplete="none"
data-form-type="other"
/>
<PasswordGenerator onUsePassword={field.onChange} />
</div>
<Input
{...field}
placeholder="Password"
type="password"
autoComplete="new-password"
autoCorrect="off"
spellCheck="false"
aria-autocomplete="none"
data-form-type="other"
/>
</FormControl>
)}
/>