diff --git a/LeftOvers/components/ListWithoutSelect.tsx b/LeftOvers/components/ListWithoutSelect.tsx index 758c0ff..0502eba 100644 --- a/LeftOvers/components/ListWithoutSelect.tsx +++ b/LeftOvers/components/ListWithoutSelect.tsx @@ -1,8 +1,7 @@ import React, { useContext } from 'react'; -import {StyleSheet, Text, TextInput, View, Image, FlatList, Pressable} from 'react-native'; -import ValidateButton from './ValidateButton'; -import HeaderFlatList from './HeaderFlatList'; -import { MultipleSelectList, SelectList } from 'react-native-dropdown-select-list' +import { StyleSheet, Image } from 'react-native'; + +import { MultipleSelectList } from 'react-native-dropdown-select-list' import ColorContext from '../theme/ColorContext'; type ListProps = { @@ -12,7 +11,7 @@ type ListProps = { export default function ListWithoutSelect(props: ListProps) { const [selected, setSelected] = React.useState([]); - const { colors, toggleColors } = useContext(ColorContext); + const colors = useContext(ColorContext).colors; const styles = StyleSheet.create({ titleBar: { diff --git a/LeftOvers/components/ProfileDetails.tsx b/LeftOvers/components/ProfileDetails.tsx index ea8ab6e..73a0a5a 100644 --- a/LeftOvers/components/ProfileDetails.tsx +++ b/LeftOvers/components/ProfileDetails.tsx @@ -14,7 +14,7 @@ type ProfileProps = { } export default function ProfileDetails(props) { - const { colors, toggleColors } = useContext(ColorContext) + const colors = useContext(ColorContext).colors const navigation = useNavigation() const [display, setDisplay] = useState("none") const changeListVisibility = () => { diff --git a/LeftOvers/components/ProfileElement.tsx b/LeftOvers/components/ProfileElement.tsx index f3ecf30..58c14cc 100644 --- a/LeftOvers/components/ProfileElement.tsx +++ b/LeftOvers/components/ProfileElement.tsx @@ -10,7 +10,7 @@ type Profile = { } export default function ProfileElement(props : Profile) { - const { colors, toggleColors } = useContext(ColorContext) + const colors = useContext(ColorContext).colors const [waiting, setWaiting] = useState("none") const [separator, setSeparator] = useState("none") diff --git a/LeftOvers/components/ProfileModification.tsx b/LeftOvers/components/ProfileModification.tsx index 52dbc0e..9c383ec 100644 --- a/LeftOvers/components/ProfileModification.tsx +++ b/LeftOvers/components/ProfileModification.tsx @@ -15,7 +15,7 @@ type ProfileProps = { export default function ProfileModification(props: ProfileProps) { const [name, onChangeName] = useState(props.name); - const { colors, toggleColors } = useContext(ColorContext); + const colors = useContext(ColorContext).colors; let imageSource if (props.avatar == "plus.png"){ diff --git a/LeftOvers/components/ProfileSelection.tsx b/LeftOvers/components/ProfileSelection.tsx index 87d349e..da4c253 100644 --- a/LeftOvers/components/ProfileSelection.tsx +++ b/LeftOvers/components/ProfileSelection.tsx @@ -19,7 +19,7 @@ type Profile = { } export default function ProfileSelection(props: ProfileSelectionProps) { - const { colors, toggleColors } = useContext(ColorContext); + const colors = useContext(ColorContext).colors; const [cpt, setCpt] = useState(0); const decreaseCounter = () => {