lint cleanup

This commit is contained in:
balzack 2024-09-14 23:14:17 -07:00
parent 8af7ab1dc5
commit 0a2bc28ebd
7 changed files with 54 additions and 101 deletions

View File

@ -1,4 +1,4 @@
import {useContext} from 'react';
import React, {useContext} from 'react';
import {Text, Button} from 'react-native-paper';
import {SafeAreaView} from 'react-native';

View File

@ -1,4 +1,4 @@
import {useContext} from 'react';
import React, {useContext} from 'react';
import {Text, Button} from 'react-native-paper';
import {SafeAreaView} from 'react-native';

View File

@ -2,7 +2,7 @@ import {Button} from 'react-native-paper';
import {Text} from 'react-native';
import {AppContext} from '../context/AppContext';
import {View} from 'react-native';
import {useContext} from 'react';
import React, {useContext} from 'react';
export function Node() {
const app = useContext(AppContext);

View File

@ -1,4 +1,4 @@
import {useState, useContext} from 'react';
import React, {useState, useContext} from 'react';
import {View, SafeAreaView} from 'react-native';
import {styles} from './Session.styled';
import {BottomNavigation, Button, Text} from 'react-native-paper';

View File

@ -1,4 +1,4 @@
import {useContext} from 'react';
import React, {useContext} from 'react';
import {AppContext} from '../context/AppContext';
import {Text, Button} from 'react-native-paper';
import {SafeAreaView} from 'react-native';

View File

@ -0,0 +1,33 @@
import {StyleSheet} from 'react-native';
export const styles = StyleSheet.create({
row: {
width: '100%',
height: '100%',
display: 'flex',
flexDirection: 'row',
justifyContent: 'space-between',
},
cell: {
width: 32,
height: '100%',
borderWidth: 1,
borderRadius: 4,
backgroundColor: '#dddddd',
borderColor: '#aaaaaa',
alignItems: 'center',
justifyContent: 'center',
display: 'flex',
},
input: {
width: '100%',
height: '100%',
opacity: 0,
position: 'absolute',
top: 0,
left: 0,
},
text: {
fontSize: 20,
}
});

View File

@ -1,5 +1,6 @@
import {TextInput, Text, View, TouchableOpacity} from 'react-native';
import {useState, useRef} from 'react';
import React, {useState, useRef} from 'react';
import {styles} from './InputCode.styled';
export function InputCode({onChangeText, style}) {
const [code, setCode] = useState('');
@ -20,108 +21,27 @@ export function InputCode({onChangeText, style}) {
return (
<View style={style}>
<View style={{width: '100%', height: 32}}>
<View
style={{
width: '100%',
height: '100%',
display: 'flex',
flexDirection: 'row',
justifyContent: 'space-between',
}}>
<View
style={{
width: 32,
height: '100%',
borderWidth: 1,
borderRadius: 4,
backgroundColor: '#dddddd',
borderColor: '#aaaaaa',
alignItems: 'center',
justifyContent: 'center',
display: 'flex',
}}>
<Text style={{fontSize: 20}}>{code.charAt(0)}</Text>
<View style={styles.row}>
<View style={styles.cell}>
<Text style={styles.text}>{code.charAt(0)}</Text>
</View>
<View
style={{
width: 32,
height: '100%',
borderWidth: 1,
borderRadius: 4,
backgroundColor: '#dddddd',
borderColor: '#aaaaaa',
alignItems: 'center',
justifyContent: 'center',
display: 'flex',
}}>
<Text style={{fontSize: 20}}>{code.charAt(1)}</Text>
<View style={styles.cell}>
<Text style={styles.text}>{code.charAt(1)}</Text>
</View>
<View
style={{
width: 32,
height: '100%',
borderWidth: 1,
borderRadius: 4,
backgroundColor: '#dddddd',
borderColor: '#aaaaaa',
alignItems: 'center',
justifyContent: 'center',
display: 'flex',
}}>
<Text style={{fontSize: 20}}>{code.charAt(2)}</Text>
<View style={styles.cell}>
<Text style={styles.text}>{code.charAt(2)}</Text>
</View>
<View
style={{
width: 32,
height: '100%',
borderWidth: 1,
borderRadius: 4,
backgroundColor: '#dddddd',
borderColor: '#aaaaaa',
alignItems: 'center',
justifyContent: 'center',
display: 'flex',
}}>
<Text style={{fontSize: 20}}>{code.charAt(3)}</Text>
<View style={styles.cell}>
<Text style={styles.text}>{code.charAt(3)}</Text>
</View>
<View
style={{
width: 32,
height: '100%',
borderWidth: 1,
borderRadius: 4,
backgroundColor: '#dddddd',
borderColor: '#aaaaaa',
alignItems: 'center',
justifyContent: 'center',
display: 'flex',
}}>
<Text style={{fontSize: 20}}>{code.charAt(4)}</Text>
<View style={styles.cell}>
<Text style={styles.text}>{code.charAt(4)}</Text>
</View>
<View
style={{
width: 32,
height: '100%',
borderWidth: 1,
borderRadius: 4,
backgroundColor: '#dddddd',
borderColor: '#aaaaaa',
alignItems: 'center',
justifyContent: 'center',
display: 'flex',
}}>
<Text style={{fontSize: 20}}>{code.charAt(5)}</Text>
<View style={styles.cell}>
<Text style={styles.text}>{code.charAt(5)}</Text>
</View>
</View>
<TextInput
style={{
width: '100%',
height: '100%',
opacity: 0,
position: 'absolute',
top: 0,
left: 0,
}}
<TextInput style={styles.input}
keyboardType={Platform.OS === 'ios' ? 'numeric' : 'number-pad'}
onChangeText={updateCode}
autoCorrect={false}