From 63b823f4c75b0830dec4af3755363c64b62c1569 Mon Sep 17 00:00:00 2001 From: Hailey Date: Wed, 9 Oct 2024 14:11:48 -0700 Subject: [PATCH] replace with new dialog --- .../com/composer/videos/SelectVideoBtn.tsx | 37 +++++++++---------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/src/view/com/composer/videos/SelectVideoBtn.tsx b/src/view/com/composer/videos/SelectVideoBtn.tsx index bbb3d95f2b..2ba003a6dd 100644 --- a/src/view/com/composer/videos/SelectVideoBtn.tsx +++ b/src/view/com/composer/videos/SelectVideoBtn.tsx @@ -15,10 +15,11 @@ import {useVideoLibraryPermission} from '#/lib/hooks/usePermissions' import {getHostnameFromUrl} from '#/lib/strings/url-helpers' import {isWeb} from '#/platform/detection' import {isNative} from '#/platform/detection' -import {useModalControls} from '#/state/modals' import {useSession} from '#/state/session' import {atoms as a, useTheme} from '#/alf' import {Button} from '#/components/Button' +import {useDialogControl} from '#/components/Dialog' +import {VerifyEmailDialog} from '#/components/dialogs/VerifyEmailDialog' import {VideoClip_Stroke2_Corner0_Rounded as VideoClipIcon} from '#/components/icons/VideoClip' import * as Prompt from '#/components/Prompt' @@ -121,26 +122,24 @@ export function SelectVideoBtn({onSelectVideo, disabled, setError}: Props) { function VerifyEmailPrompt({control}: {control: Prompt.PromptControlProps}) { const {_} = useLingui() - const {openModal} = useModalControls() + const verifyEmailDialogControl = useDialogControl() return ( - { - control.close(() => { - openModal({ - name: 'verify-email', - showReminder: false, - }) - }) - }} - /> + <> + { + verifyEmailDialogControl.open() + }} + /> + + ) }