From 4a016ed57db526ee900c567f7b7f0991f948c631 Mon Sep 17 00:00:00 2001 From: Elias Schneider Date: Tue, 6 Dec 2022 11:05:04 +0100 Subject: [PATCH] fix: unauthenticated dialog not shown --- .../upload/modals/showCreateUploadModal.tsx | 14 ++++++-------- frontend/src/pages/upload.tsx | 12 +++++------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/frontend/src/components/upload/modals/showCreateUploadModal.tsx b/frontend/src/components/upload/modals/showCreateUploadModal.tsx index 85c3b32..c9a44ad 100644 --- a/frontend/src/components/upload/modals/showCreateUploadModal.tsx +++ b/frontend/src/components/upload/modals/showCreateUploadModal.tsx @@ -29,8 +29,8 @@ const showCreateUploadModal = ( modals: ModalsContextProps, options: { isUserSignedIn: boolean; - ALLOW_UNAUTHENTICATED_SHARES: boolean; - ENABLE_EMAIL_RECIPIENTS: boolean; + allowUnauthenticatedShares: boolean; + enableEmailRecepients: boolean; }, uploadCallback: ( id: string, @@ -62,15 +62,13 @@ const CreateUploadModalBody = ({ ) => void; options: { isUserSignedIn: boolean; - ALLOW_UNAUTHENTICATED_SHARES: boolean; - ENABLE_EMAIL_RECIPIENTS: boolean; + allowUnauthenticatedShares: boolean; + enableEmailRecepients: boolean; }; }) => { const modals = useModals(); - const [showNotSignedInAlert, setShowNotSignedInAlert] = useState( - options.ENABLE_EMAIL_RECIPIENTS - ); + const [showNotSignedInAlert, setShowNotSignedInAlert] = useState(true); const validationSchema = yup.object().shape({ link: yup @@ -230,7 +228,7 @@ const CreateUploadModalBody = ({ {ExpirationPreview({ form })} - {options.ENABLE_EMAIL_RECIPIENTS && ( + {options.enableEmailRecepients && ( Email recipients diff --git a/frontend/src/pages/upload.tsx b/frontend/src/pages/upload.tsx index 2c86c1c..390b07d 100644 --- a/frontend/src/pages/upload.tsx +++ b/frontend/src/pages/upload.tsx @@ -105,21 +105,19 @@ const Upload = () => {