fix: make display options copy type-agnostic (#1054)

This commit is contained in:
Aman Harwara
2022-05-30 16:48:44 +05:30
committed by GitHub
parent 501da8ecc6
commit cab27656ba
3 changed files with 26 additions and 20 deletions

View File

@@ -15,12 +15,12 @@ import {
useState,
} from 'react'
import ContentList from '@/Components/ContentListView/ContentList'
import NotesListOptionsMenu from '@/Components/ContentListView/NotesListOptionsMenu'
import NoAccountWarningWrapper from '@/Components/NoAccountWarning/NoAccountWarning'
import SearchOptions from '@/Components/SearchOptions/SearchOptions'
import PanelResizer, { PanelSide, ResizeFinishCallback, PanelResizeType } from '@/Components/PanelResizer/PanelResizer'
import { Disclosure, DisclosureButton, DisclosurePanel } from '@reach/disclosure'
import { useCloseOnBlur } from '@/Hooks/useCloseOnBlur'
import ContentListOptionsMenu from './ContentListOptionsMenu'
type Props = {
application: WebApplication
@@ -233,8 +233,9 @@ const ContentListView: FunctionComponent<Props> = ({ application, appState }) =>
</DisclosureButton>
<DisclosurePanel onBlur={closeDisplayOptMenuOnBlur}>
{showDisplayOptionsMenu && (
<NotesListOptionsMenu
<ContentListOptionsMenu
application={application}
appState={appState}
closeDisplayOptionsMenu={toggleDisplayOptionsMenu}
closeOnBlur={closeDisplayOptMenuOnBlur}
isOpen={showDisplayOptionsMenu}