From 9be77826e95cd808f1a5f6a0d80e89aa8a3b6994 Mon Sep 17 00:00:00 2001 From: pierrbt Date: Fri, 23 Jun 2023 01:39:22 +0200 Subject: [PATCH] Formatting --- .../upload/modals/showCompletedUploadModal.tsx | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/frontend/src/components/upload/modals/showCompletedUploadModal.tsx b/frontend/src/components/upload/modals/showCompletedUploadModal.tsx index bb2b9f5..79d04d8 100644 --- a/frontend/src/components/upload/modals/showCompletedUploadModal.tsx +++ b/frontend/src/components/upload/modals/showCompletedUploadModal.tsx @@ -23,28 +23,27 @@ const showCompletedUploadModal = ( }); }; - - const Body = ({ share, appUrl }: { share: Share; appUrl: string }) => { const clipboard = useClipboard({ timeout: 500 }); const modals = useModals(); const router = useRouter(); const [checkState, setCheckState] = useState(false); - const timerRef = useRef | undefined>(undefined); + const timerRef = useRef | undefined>( + undefined + ); const link = `${appUrl}/share/${share.id}`; const copyLink = () => { clipboard.copy(link); toast.success("Your link was copied to the keyboard."); - if (timerRef.current) - clearTimeout(timerRef.current); + if (timerRef.current) clearTimeout(timerRef.current); timerRef.current = setTimeout(() => { setCheckState(false); }, 1500); setCheckState(true); - } + }; return ( @@ -55,10 +54,8 @@ const Body = ({ share, appUrl }: { share: Share; appUrl: string }) => { onClick={copyLink} rightSection={ window.isSecureContext && ( - - { checkState ? : } + + {checkState ? : } ) }