From 57d46bbe360a4ce7a7918db382e9e1a17e95c92e Mon Sep 17 00:00:00 2001 From: Rayhan Hassou Date: Wed, 15 Nov 2023 08:01:43 +0100 Subject: [PATCH] add modification --- LeftOvers/components/CustomButton.tsx | 3 +-- LeftOvers/components/TopBar.tsx | 6 ++---- LeftOvers/screens/IngredientSelection.tsx | 4 ++-- LeftOvers/screens/RecipeDetails.tsx | 2 +- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/LeftOvers/components/CustomButton.tsx b/LeftOvers/components/CustomButton.tsx index ea913d1..5cd9d65 100644 --- a/LeftOvers/components/CustomButton.tsx +++ b/LeftOvers/components/CustomButton.tsx @@ -3,11 +3,10 @@ import {StyleSheet,Pressable, Text, View} from 'react-native'; interface CustomButtonProps { - source : string title : string } -export default function CustomButton(props) { +export default function CustomButton(props: CustomButtonProps) { return ( diff --git a/LeftOvers/components/TopBar.tsx b/LeftOvers/components/TopBar.tsx index aa45d40..fda32e4 100644 --- a/LeftOvers/components/TopBar.tsx +++ b/LeftOvers/components/TopBar.tsx @@ -2,14 +2,12 @@ import React from 'react'; import { Appbar } from 'react-native-paper'; interface TopBarProps{ - source : string - firstImage : string - lastImage : string + title : string isVisible : boolean } - export default function TopBar(props : any) { + export default function TopBar(props) { const _goBack = () => console.log('Went back'); diff --git a/LeftOvers/screens/IngredientSelection.tsx b/LeftOvers/screens/IngredientSelection.tsx index 17a8018..39e61f9 100644 --- a/LeftOvers/screens/IngredientSelection.tsx +++ b/LeftOvers/screens/IngredientSelection.tsx @@ -8,7 +8,7 @@ import FoodElementText from '../components/FoodElementText'; import CustomButton from '../components/CustomButton'; -export default function IngredientSelection(props) { +export default function IngredientSelection() { const [searchQuery, setSearchQuery] = React.useState(''); @@ -16,7 +16,7 @@ export default function IngredientSelection(props) { return ( - + diff --git a/LeftOvers/screens/RecipeDetails.tsx b/LeftOvers/screens/RecipeDetails.tsx index efc829a..2b51f33 100644 --- a/LeftOvers/screens/RecipeDetails.tsx +++ b/LeftOvers/screens/RecipeDetails.tsx @@ -8,7 +8,7 @@ import RecipeElementReduce from '../components/RecipeElementReduce'; export default function RecipeDetails(props) { return ( - +