diff --git a/LeftOvers/Services/Profiles/IProfileService.ts b/LeftOvers/Services/Profiles/IProfileService.ts index a3fdfe6..425a961 100644 --- a/LeftOvers/Services/Profiles/IProfileService.ts +++ b/LeftOvers/Services/Profiles/IProfileService.ts @@ -3,5 +3,5 @@ import Profil from "../../Models/Profil"; export default interface IProfileService { getProfiles(): Promise, addProfile(new_profile: Profil): Promise, - delProfile(profile_name_to_del: String): Promise + delProfile(profile_name_to_del: string): Promise } \ No newline at end of file diff --git a/LeftOvers/Services/Profiles/ProfileService.ts b/LeftOvers/Services/Profiles/ProfileService.ts index e013180..30646bf 100644 --- a/LeftOvers/Services/Profiles/ProfileService.ts +++ b/LeftOvers/Services/Profiles/ProfileService.ts @@ -25,7 +25,7 @@ export default class ProfileService implements IProfileService { return true } - async delProfile(profile_name_to_del: String): Promise { + async delProfile(profile_name_to_del: string): Promise { const existing_profiles = await this.getProfiles() let key: number = -1 for (let current_profile of existing_profiles) { diff --git a/LeftOvers/components/ProfileDetails.tsx b/LeftOvers/components/ProfileDetails.tsx index 1ef9c9b..f9dafb3 100644 --- a/LeftOvers/components/ProfileDetails.tsx +++ b/LeftOvers/components/ProfileDetails.tsx @@ -16,7 +16,6 @@ type ProfileProps = { export default function ProfileDetails(props) { const colors = useContext(ColorContext).colors - const navigation = useNavigation() const [display, setDisplay] = useState("none") const changeListVisibility = () => { if (display == "none"){ diff --git a/LeftOvers/components/ProfileSelection.tsx b/LeftOvers/components/ProfileSelection.tsx index f748365..daf409e 100644 --- a/LeftOvers/components/ProfileSelection.tsx +++ b/LeftOvers/components/ProfileSelection.tsx @@ -6,7 +6,6 @@ import ColorContext from '../theme/ColorContext'; import bracketLeft from '../assets/images/angle_bracket_left.png'; import bracketRight from '../assets/images/angle_bracket_right.png'; -import EventEmitter from '../screens/EventEmitter'; type ProfileSelectionProps = { listProfile: Profile[] diff --git a/LeftOvers/screens/CreateProfile.tsx b/LeftOvers/screens/CreateProfile.tsx index 76b4bc0..72a37c7 100644 --- a/LeftOvers/screens/CreateProfile.tsx +++ b/LeftOvers/screens/CreateProfile.tsx @@ -8,19 +8,17 @@ import ListWithoutSelect from '../components/ListWithoutSelect'; import ListSelect from '../components/ListSelect'; import EventEmitter from './EventEmitter'; import * as ImagePicker from 'expo-image-picker'; -import ProfileService from '../Services/Profiles/ProfileService'; import AsyncStorage from '@react-native-async-storage/async-storage'; export default function CreateProfile(props) { const colors = useContext(ColorContext).colors - const profile_service = new ProfileService() const all = [] const die = [{value: "Dairy free"}, {value: "Gluten free"}, {value: "Porkless"}, {value: "Vegan"}, {value: "Vegetarian"}, {value: "Pescatarian"}] const [name, onChangeName] = useState(); const [avatar, setAvatar] = useState(''); const [selectedDiets, setSelectedDiets] = useState([]); - const [selectedAllergies, setSelectedAllergies] = useState([]) + const [selectedAllergies] = useState([]) const handleSelectedDiets = (selectedValues) => { setSelectedDiets(selectedValues); diff --git a/LeftOvers/screens/HomePage.tsx b/LeftOvers/screens/HomePage.tsx index 0206991..622330a 100644 --- a/LeftOvers/screens/HomePage.tsx +++ b/LeftOvers/screens/HomePage.tsx @@ -8,7 +8,6 @@ import ProfileSelection from '../components/ProfileSelection'; import FoodElementText from '../components/FoodElementText'; import ColorContext from '../theme/ColorContext'; import ProfileService from '../Services/Profiles/ProfileService'; -import Profil from '../Models/Profil'; import bracketLeft from '../assets/images/angle_bracket_left.png'; import bracketRight from '../assets/images/angle_bracket_right.png'; @@ -18,7 +17,6 @@ import EventEmitter from './EventEmitter'; export default function HomePage({ navigation, props }) { const colors = useContext(ColorContext).colors - const profile_service = new ProfileService() const profilesHand = [ {name: "None", avatar: "logo.png", isActive: "none"} diff --git a/LeftOvers/screens/Profiles.tsx b/LeftOvers/screens/Profiles.tsx index 132f318..4a18bb7 100644 --- a/LeftOvers/screens/Profiles.tsx +++ b/LeftOvers/screens/Profiles.tsx @@ -9,11 +9,9 @@ import ColorContext from '../theme/ColorContext'; import AsyncStorage from '@react-native-async-storage/async-storage'; import EventEmitter from './EventEmitter'; import { PaperProvider, Portal } from 'react-native-paper'; -import ProfileService from '../Services/Profiles/ProfileService'; export default function Profiles({navigation, props}) { const colors = useContext(ColorContext).colors - const profile_service = new ProfileService() const [visible, setVisible] = useState(false); const [profiles, setProfiles] = useState([]);