refactor: replace 'preact' with 'react' (#1048)

This commit is contained in:
Aman Harwara
2022-05-30 12:42:52 +05:30
committed by GitHub
parent e74b4953ea
commit 8c368dd96b
231 changed files with 4794 additions and 4302 deletions

View File

@@ -1,28 +1,22 @@
import { FunctionComponent } from 'preact'
import { FunctionComponent } from 'react'
import { observer } from 'mobx-react-lite'
import { WebApplication } from '@/UIModels/Application'
import { PreferencesView } from './PreferencesView'
import { AppState } from '@/UIModels/AppState'
import PreferencesView from './PreferencesView'
import { PreferencesViewWrapperProps } from './PreferencesViewWrapperProps'
export interface PreferencesViewWrapperProps {
appState: AppState
application: WebApplication
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 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}
/>
)
},
)
export default observer(PreferencesViewWrapper)