From a5aad61cb7336f843823b365118504d49933d823 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Sat, 26 Oct 2024 19:36:21 -0500 Subject: [PATCH] fix: close dialog on close --- packages/website/src/components/Embeds/CopyURL.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/website/src/components/Embeds/CopyURL.tsx b/packages/website/src/components/Embeds/CopyURL.tsx index 1cefeedf6..3c64be59d 100644 --- a/packages/website/src/components/Embeds/CopyURL.tsx +++ b/packages/website/src/components/Embeds/CopyURL.tsx @@ -18,7 +18,6 @@ import { debounce } from 'lodash-es'; import { useCallback, useRef, useState } from 'react'; import { stringify } from 'urlon'; import type { configurations } from '../../constants/embeds'; -import { App } from '../../stores/app'; import { EmbedState, type EmbedStateStore } from '../../stores/embedState'; import { CopyButton } from '../CopyButton'; @@ -27,7 +26,7 @@ interface CopyURLProps { } export function CopyURL({ embed }: CopyURLProps) { - const appStore = App.useStore(); + const [dialogOpen, setDialogOpen] = useState(false); const embedStateStore = EmbedState.useStore(); const input = useRef(null); const [searching, setSearching] = useState(false); @@ -65,7 +64,7 @@ export function CopyURL({ embed }: CopyURLProps) { }, []); return ( - +