mirror of
https://github.com/standardnotes/app.git
synced 2026-01-11 19:56:41 +00:00
28 lines
802 B
TypeScript
28 lines
802 B
TypeScript
import { FunctionComponent } from 'preact'
|
|
import { observer } from 'mobx-react-lite'
|
|
import { WebApplication } from '@/UIModels/Application'
|
|
import { PreferencesView } from './PreferencesView'
|
|
import { AppState } from '@/UIModels/AppState'
|
|
|
|
export interface PreferencesViewWrapperProps {
|
|
appState: AppState
|
|
application: WebApplication
|
|
}
|
|
|
|
export const PreferencesViewWrapper: FunctionComponent<PreferencesViewWrapperProps> = observer(
|
|
({ appState, application }) => {
|
|
if (!appState.preferences?.isOpen) {
|
|
return null
|
|
}
|
|
|
|
return (
|
|
<PreferencesView
|
|
closePreferences={() => appState.preferences.closePreferences()}
|
|
application={application}
|
|
appState={appState}
|
|
mfaProvider={application}
|
|
userProvider={application}
|
|
/>
|
|
)
|
|
},
|
|
)
|