diff --git a/frontend/src/Settings/Metadata/Metadata/EditMetadataModal.tsx b/frontend/src/Settings/Metadata/Metadata/EditMetadataModal.tsx index 6dd30ca78..9731a39ab 100644 --- a/frontend/src/Settings/Metadata/Metadata/EditMetadataModal.tsx +++ b/frontend/src/Settings/Metadata/Metadata/EditMetadataModal.tsx @@ -1,5 +1,6 @@ import React, { useCallback } from 'react'; -import { useDispatch } from 'react-redux'; +import { useDispatch, useSelector } from 'react-redux'; +import AppState from 'App/State/AppState'; import Modal from 'Components/Modal/Modal'; import { sizes } from 'Helpers/Props'; import { clearPendingChanges } from 'Store/Actions/baseActions'; @@ -7,7 +8,8 @@ import EditMetadataModalContent, { EditMetadataModalContentProps, } from './EditMetadataModalContent'; -interface EditMetadataModalProps extends EditMetadataModalContentProps { +interface EditMetadataModalProps + extends Omit { isOpen: boolean; } @@ -18,6 +20,10 @@ function EditMetadataModal({ }: EditMetadataModalProps) { const dispatch = useDispatch(); + const advancedSettings = useSelector( + (state: AppState) => state.settings.advancedSettings + ); + const handleModalClose = useCallback(() => { dispatch(clearPendingChanges({ section: 'metadata' })); onModalClose(); @@ -27,6 +33,7 @@ function EditMetadataModal({ diff --git a/frontend/src/Settings/Metadata/Metadata/Metadata.tsx b/frontend/src/Settings/Metadata/Metadata/Metadata.tsx index 52797218d..bb988d0d9 100644 --- a/frontend/src/Settings/Metadata/Metadata/Metadata.tsx +++ b/frontend/src/Settings/Metadata/Metadata/Metadata.tsx @@ -95,7 +95,6 @@ function Metadata({ id, name, enable, fields }: MetadataProps) { ) : null}