mirror of
https://github.com/Infisical/infisical.git
synced 2026-01-09 15:38:03 -05:00
Remove unnecessary function call
This commit is contained in:
@@ -69,8 +69,6 @@ const PasswordGeneratorModal = ({
|
||||
|
||||
useEffect(() => {
|
||||
if (isOpen) {
|
||||
generatePassword();
|
||||
|
||||
const handleClickOutside = (event: MouseEvent) => {
|
||||
if (modalRef.current && !modalRef.current.contains(event.target as Node)) {
|
||||
onClose();
|
||||
@@ -95,9 +93,14 @@ const PasswordGeneratorModal = ({
|
||||
]);
|
||||
|
||||
const copyToClipboard = () => {
|
||||
navigator.clipboard.writeText(password).then(() => {
|
||||
setCopyText("Copied");
|
||||
});
|
||||
navigator.clipboard
|
||||
.writeText(password)
|
||||
.then(() => {
|
||||
setCopyText("Copied");
|
||||
})
|
||||
.catch(() => {
|
||||
setCopyText("Copy failed");
|
||||
});
|
||||
};
|
||||
|
||||
const usePassword = () => {
|
||||
|
||||
Reference in New Issue
Block a user