Files
standardnotes-app-web/app/assets/javascripts/Components/Preferences/PreferencesViewWrapper.tsx
2022-05-30 12:42:52 +05:30

23 lines
670 B
TypeScript

import { FunctionComponent } from 'react'
import { observer } from 'mobx-react-lite'
import PreferencesView from './PreferencesView'
import { PreferencesViewWrapperProps } from './PreferencesViewWrapperProps'
const PreferencesViewWrapper: FunctionComponent<PreferencesViewWrapperProps> = ({ appState, application }) => {
if (!appState.preferences?.isOpen) {
return null
}
return (
<PreferencesView
closePreferences={() => appState.preferences.closePreferences()}
application={application}
appState={appState}
mfaProvider={application}
userProvider={application}
/>
)
}
export default observer(PreferencesViewWrapper)