Remove unnecessary prop
This commit is contained in:
parent
c4204432d7
commit
9f3b932189
|
@ -5,12 +5,10 @@ import Base from './Base';
|
||||||
import { TYPE } from './constants';
|
import { TYPE } from './constants';
|
||||||
import I18n from '../../i18n';
|
import I18n from '../../i18n';
|
||||||
|
|
||||||
const PasscodeEnter = ({
|
const PasscodeEnter = ({ theme, finishProcess }) => {
|
||||||
theme, type, finishProcess
|
|
||||||
}) => {
|
|
||||||
const confirmRef = useRef(null);
|
const confirmRef = useRef(null);
|
||||||
const [subtitle, setSubtitle] = useState(null);
|
const [subtitle, setSubtitle] = useState(null);
|
||||||
const [status, setStatus] = useState(type);
|
const [status, setStatus] = useState(TYPE.CHOOSE);
|
||||||
const [previousPasscode, setPreviouPasscode] = useState(null);
|
const [previousPasscode, setPreviouPasscode] = useState(null);
|
||||||
|
|
||||||
const firstStep = (p) => {
|
const firstStep = (p) => {
|
||||||
|
@ -53,7 +51,6 @@ const PasscodeEnter = ({
|
||||||
|
|
||||||
PasscodeEnter.propTypes = {
|
PasscodeEnter.propTypes = {
|
||||||
theme: PropTypes.string,
|
theme: PropTypes.string,
|
||||||
type: PropTypes.string,
|
|
||||||
finishProcess: PropTypes.func
|
finishProcess: PropTypes.func
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -13,14 +13,12 @@ import { resetAttempts } from '../../utils/localAuthentication';
|
||||||
import { getLockedUntil, getDiff } from './utils';
|
import { getLockedUntil, getDiff } from './utils';
|
||||||
import I18n from '../../i18n';
|
import I18n from '../../i18n';
|
||||||
|
|
||||||
const PasscodeEnter = ({
|
const PasscodeEnter = ({ theme, finishProcess }) => {
|
||||||
theme, type, finishProcess
|
|
||||||
}) => {
|
|
||||||
const ref = useRef(null);
|
const ref = useRef(null);
|
||||||
let attempts = 0;
|
let attempts = 0;
|
||||||
let lockedUntil = false;
|
let lockedUntil = false;
|
||||||
let passcode = null;
|
let passcode = null;
|
||||||
const [status, setStatus] = useState(type);
|
const [status, setStatus] = useState(TYPE.ENTER);
|
||||||
const { getItem: getAttempts, setItem: setAttempts } = useAsyncStorage(ATTEMPTS_KEY);
|
const { getItem: getAttempts, setItem: setAttempts } = useAsyncStorage(ATTEMPTS_KEY);
|
||||||
const { setItem: setLockedUntil } = useAsyncStorage(LOCKED_OUT_TIMER_KEY);
|
const { setItem: setLockedUntil } = useAsyncStorage(LOCKED_OUT_TIMER_KEY);
|
||||||
|
|
||||||
|
@ -70,7 +68,6 @@ const PasscodeEnter = ({
|
||||||
|
|
||||||
PasscodeEnter.propTypes = {
|
PasscodeEnter.propTypes = {
|
||||||
theme: PropTypes.string,
|
theme: PropTypes.string,
|
||||||
type: PropTypes.string,
|
|
||||||
finishProcess: PropTypes.func
|
finishProcess: PropTypes.func
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,6 @@ import { withSplit } from '../split';
|
||||||
import { LOCAL_AUTHENTICATE_EMITTER } from '../constants/localAuthentication';
|
import { LOCAL_AUTHENTICATE_EMITTER } from '../constants/localAuthentication';
|
||||||
import { isTablet } from '../utils/deviceInfo';
|
import { isTablet } from '../utils/deviceInfo';
|
||||||
import { PasscodeEnter } from '../containers/Passcode';
|
import { PasscodeEnter } from '../containers/Passcode';
|
||||||
import { TYPE } from '../containers/Passcode/constants';
|
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
container: {
|
container: {
|
||||||
|
@ -67,7 +66,7 @@ const ScreenLockedView = ({ theme }) => {
|
||||||
animationOut='fadeOut'
|
animationOut='fadeOut'
|
||||||
>
|
>
|
||||||
<View style={[styles.container, { backgroundColor: themes[theme].auxiliaryBackground }]}>
|
<View style={[styles.container, { backgroundColor: themes[theme].auxiliaryBackground }]}>
|
||||||
<PasscodeEnter theme={theme} type={TYPE.ENTER} finishProcess={onSubmit} />
|
<PasscodeEnter theme={theme} finishProcess={onSubmit} />
|
||||||
</View>
|
</View>
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue