removing unused variables

pull/23/head
Rémi REGNAULT 1 year ago
parent c204a2a542
commit 995095f20a

@ -16,7 +16,7 @@ import DarkIcon from '../assets/images/moon.png';
export default function BottomBar({ state, descriptors, navigation }) {
const {theme, toggleTheme} = useContext(ThemeContext);
const {colors, toggleColors} = useContext(ColorContext)
const toggleColors = useContext(ColorContext).toggleColors;
const [iconThemeButton, setThemeIconButton] = useState(( theme === 'dark' ) ? LightIcon : DarkIcon)
const [textThemeButton, setTextThemeButton] = useState(( theme === 'dark' ) ? 'Light' : 'Dark');

@ -8,7 +8,7 @@ import ThemeContext from '../theme/ThemeContext';
const CookingStack = createNativeStackNavigator()
export default function CookingStackScreen() {
const {theme, toggleTheme} = useContext(ThemeContext);
const theme = useContext(ThemeContext).theme;
return (
<CookingStack.Navigator>

@ -23,8 +23,7 @@ function AppIcon() {
}
export default function HomeStackScreen() {
const {theme, toggleTheme} = useContext(ThemeContext)
const {colors, toggleColors} = useContext(ColorContext)
const colors = useContext(ColorContext).colors
return (
<HomeStack.Navigator>

@ -5,7 +5,7 @@ import { createNativeStackNavigator } from '@react-navigation/native-stack';
import Profiles from '../screens/Profiles';
import CreateProfile from '../screens/CreateProfile';
import ModifyProfile from '../screens/ModifyProfile';
import ThemeContext from '../theme/ThemeContext';
import ColorContext from '../theme/ColorContext';
import { HeaderTitle } from './Utils';
@ -15,11 +15,11 @@ import AddIcon from '../assets/images/plus.png'
const ProfilesStack = createNativeStackNavigator()
export default function ProfilesStackScreen({ navigation }) {
const {theme, toggleTheme} = useContext(ThemeContext);
const colors = useContext(ColorContext).colors;
const styles = StyleSheet.create({
headerBarContainer: {
backgroundColor: theme === 'light' ? '#F2F0E4' : '#3F3C42',
backgroundColor: colors.cardBackground,
},
headerBarRightContainer: {
display: 'flex',
@ -53,13 +53,13 @@ export default function ProfilesStackScreen({ navigation }) {
<Image
source={SearchIcon}
style={styles.headerBarIcon}
tintColor={theme === 'light' ? '#3F3C42' : '#F2F0E4'}/>
tintColor={colors.cardDetail}/>
</Pressable>
<Pressable onPress={_handleHeaderAdd}>
<Image
source={AddIcon}
style={styles.headerBarIcon}
tintColor={theme === 'light' ? '#3F3C42' : '#F2F0E4'}/>
tintColor={colors.cardDetail}/>
</Pressable>
</View>
)

@ -4,7 +4,7 @@ import { Text, StyleSheet } from 'react-native';
import ColorContext from '../theme/ColorContext';
export function HeaderTitle(props) {
const {colors, toggleColors} = useContext(ColorContext)
const colors = useContext(ColorContext).colors
const styles = StyleSheet.create({
headerTitle: {

@ -8,7 +8,7 @@ import ValidateButton from '../components/ValidateButton';
import ColorContext from '../theme/ColorContext';
export default function CreateProfile(props) {
const { colors, toggleColors } = useContext(ColorContext)
const colors = useContext(ColorContext).colors
const all = []
const die = [{value: "Dairy free"}, {value: "Gluten free"}, {value: "Porkless"}, {value: "Vegan"}, {value: "Vegetarian"}, {value: "Pescatarian"}]

@ -9,7 +9,7 @@ import ProfileDelete from '../components/ProfileDelete';
import ColorContext from '../theme/ColorContext';
export default function Profiles({navigation, props}) {
const { colors, toggleColors } = useContext(ColorContext)
const colors = useContext(ColorContext).colors
const allJohnny = [{value: "Coconut"}, {value: "Skimmed Milk"}, {value: "Nuts"}]
const dieJohnny = [{value: "Gluten free"}, {value: "Porkless"}, {value: "Pescatarian"}]

Loading…
Cancel
Save