* feat: integrate SNJS MFA with web * fix: create rudimentary typings file for qrcode.react * chore: lint fixes * fix: address PR feedback * fix: address PR feedback * fix: address PR feedback 2 * fix: replace spread props on TwoFactorAuthWrapper component * chore: change null check to undefined check
25 lines
755 B
TypeScript
25 lines
755 B
TypeScript
import { FunctionComponent } from 'preact';
|
|
import { observer } from 'mobx-react-lite';
|
|
import { WebApplication } from '@/ui_models/application';
|
|
import { PreferencesView } from './PreferencesView';
|
|
|
|
export interface PreferencesViewWrapperProps {
|
|
appState: { preferences: { isOpen: boolean; closePreferences: () => void } };
|
|
application: WebApplication;
|
|
}
|
|
|
|
export const PreferencesViewWrapper: FunctionComponent<PreferencesViewWrapperProps> =
|
|
observer(({ appState, application }) => {
|
|
if (!appState.preferences.isOpen) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<PreferencesView
|
|
closePreferences={() => appState.preferences.closePreferences()}
|
|
application={application}
|
|
mfaGateway={application}
|
|
/>
|
|
);
|
|
});
|