Remove unnecessary prop

This commit is contained in:
Diego Mello 2020-04-24 10:53:49 -03:00
parent c4204432d7
commit 9f3b932189
3 changed files with 5 additions and 12 deletions

View File

@ -5,12 +5,10 @@ import Base from './Base';
import { TYPE } from './constants';
import I18n from '../../i18n';
const PasscodeEnter = ({
theme, type, finishProcess
}) => {
const PasscodeEnter = ({ theme, finishProcess }) => {
const confirmRef = useRef(null);
const [subtitle, setSubtitle] = useState(null);
const [status, setStatus] = useState(type);
const [status, setStatus] = useState(TYPE.CHOOSE);
const [previousPasscode, setPreviouPasscode] = useState(null);
const firstStep = (p) => {
@ -53,7 +51,6 @@ const PasscodeEnter = ({
PasscodeEnter.propTypes = {
theme: PropTypes.string,
type: PropTypes.string,
finishProcess: PropTypes.func
};

View File

@ -13,14 +13,12 @@ import { resetAttempts } from '../../utils/localAuthentication';
import { getLockedUntil, getDiff } from './utils';
import I18n from '../../i18n';
const PasscodeEnter = ({
theme, type, finishProcess
}) => {
const PasscodeEnter = ({ theme, finishProcess }) => {
const ref = useRef(null);
let attempts = 0;
let lockedUntil = false;
let passcode = null;
const [status, setStatus] = useState(type);
const [status, setStatus] = useState(TYPE.ENTER);
const { getItem: getAttempts, setItem: setAttempts } = useAsyncStorage(ATTEMPTS_KEY);
const { setItem: setLockedUntil } = useAsyncStorage(LOCKED_OUT_TIMER_KEY);
@ -70,7 +68,6 @@ const PasscodeEnter = ({
PasscodeEnter.propTypes = {
theme: PropTypes.string,
type: PropTypes.string,
finishProcess: PropTypes.func
};

View File

@ -15,7 +15,6 @@ import { withSplit } from '../split';
import { LOCAL_AUTHENTICATE_EMITTER } from '../constants/localAuthentication';
import { isTablet } from '../utils/deviceInfo';
import { PasscodeEnter } from '../containers/Passcode';
import { TYPE } from '../containers/Passcode/constants';
const styles = StyleSheet.create({
container: {
@ -67,7 +66,7 @@ const ScreenLockedView = ({ theme }) => {
animationOut='fadeOut'
>
<View style={[styles.container, { backgroundColor: themes[theme].auxiliaryBackground }]}>
<PasscodeEnter theme={theme} type={TYPE.ENTER} finishProcess={onSubmit} />
<PasscodeEnter theme={theme} finishProcess={onSubmit} />
</View>
</Modal>
);