mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-05-31 14:11:58 +05:30
Switch Profile to new Context API
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import logger from 'app/services/logger';
|
||||
import { disable as disableMFA } from 'app/services/api/mfa';
|
||||
import { FormModel } from 'app/components/ui/form';
|
||||
|
||||
import Context from '../Context';
|
||||
import MfaDisableForm from './disableForm/MfaDisableForm';
|
||||
import MfaStatus from './status/MfaStatus';
|
||||
|
||||
@@ -16,9 +16,8 @@ export default class MfaDisable extends React.Component<
|
||||
showForm: boolean;
|
||||
}
|
||||
> {
|
||||
static contextTypes = {
|
||||
userId: PropTypes.number.isRequired,
|
||||
};
|
||||
static contextType = Context;
|
||||
/* TODO: use declare */ context: React.ContextType<typeof Context>;
|
||||
|
||||
state = {
|
||||
showForm: false,
|
||||
|
||||
Reference in New Issue
Block a user