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