diff --git a/app.json b/app.json index e6e20c0..359d0dd 100644 --- a/app.json +++ b/app.json @@ -1,14 +1,14 @@ { "expo": { - "name": "ohome-app", - "slug": "ohome-app", + "name": "Ohome", + "slug": "ohome", "version": "1.0.0", "orientation": "portrait", - "icon": "./assets/icon.png", + "icon": "./assets/logo512.png", "splash": { - "image": "./assets/splash.png", + "image": "./assets/OhomeSplash.png", "resizeMode": "contain", - "backgroundColor": "#ffffff" + "backgroundColor": "#f9f6ef" }, "updates": { "fallbackToCacheTimeout": 0 @@ -17,16 +17,20 @@ "**/*" ], "ios": { + "bundleIdentifier": "codebenchers.ohome", + "buildNumber": "1.0.0", "supportsTablet": true }, "android": { + "package": "codebenchers.ohome", + "versionCode": 1, "adaptiveIcon": { - "foregroundImage": "./assets/adaptive-icon.png", - "backgroundColor": "#FFFFFF" + "foregroundImage": "./assets/logo512.png", + "backgroundColor": "#f9f6ef" } }, "web": { - "favicon": "./assets/favicon.png" + "favicon": "./assets/logo192.png" } } -} +} \ No newline at end of file diff --git a/assets/OhomeSplash.png b/assets/OhomeSplash.png new file mode 100644 index 0000000..5ef2543 Binary files /dev/null and b/assets/OhomeSplash.png differ diff --git a/assets/adaptive-icon.png b/assets/adaptive-icon.png deleted file mode 100644 index 03d6f6b..0000000 Binary files a/assets/adaptive-icon.png and /dev/null differ diff --git a/assets/favicon.png b/assets/favicon.png deleted file mode 100644 index e75f697..0000000 Binary files a/assets/favicon.png and /dev/null differ diff --git a/assets/icon.png b/assets/icon.png deleted file mode 100644 index a0b1526..0000000 Binary files a/assets/icon.png and /dev/null differ diff --git a/assets/logo192.png b/assets/logo192.png new file mode 100644 index 0000000..3c1f045 Binary files /dev/null and b/assets/logo192.png differ diff --git a/assets/logo512.png b/assets/logo512.png new file mode 100644 index 0000000..99eeb29 Binary files /dev/null and b/assets/logo512.png differ diff --git a/assets/splash.png b/assets/splash.png deleted file mode 100644 index 0e89705..0000000 Binary files a/assets/splash.png and /dev/null differ diff --git a/src/App.js b/src/App.js index 1d50e07..8989465 100644 --- a/src/App.js +++ b/src/App.js @@ -11,10 +11,11 @@ import Recipe from './pages/recipes/Recipe'; import theme from './styles/theme'; //dependencies +import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons'; //navigation import { NavigationContainer } from '@react-navigation/native'; import { createNativeStackNavigator } from '@react-navigation/native-stack'; - +import { useNavigation } from '@react-navigation/core'; import { useSelector } from 'react-redux'; @@ -38,11 +39,21 @@ function App() { backgroundColor: theme.colors.dp00 + 'bb' }, //COLORS.dp08 headerShadowVisible: false, - headerTintColor: theme.colors.textW0, - headerTitleStyle: { fontSize: 32 }, + headerTintColor: theme.colors.textW1, + headerTitleStyle: { fontSize: 32, fontWeight: 'bold' }, cardOverlayEnabled: true, headerTransparent: true, - }}> + headerLeft: () => { + const navigation = useNavigation() + return ( + < MaterialCommunityIcons style={{marginLeft: -5, marginRight: 15, marginTop: 5}} name="arrow-left" size={40} color={theme.colors.textW2} + onPress={() => navigation.goBack()} + > + )} + }} + options={{ + }}> + ( < TouchableOpacity @@ -54,7 +65,7 @@ function App() { - + ); diff --git a/src/components/GroceryList/groceries/List.js b/src/components/GroceryList/groceries/List.js index 41dfbd6..4f93ae0 100644 --- a/src/components/GroceryList/groceries/List.js +++ b/src/components/GroceryList/groceries/List.js @@ -48,9 +48,10 @@ export default React.memo((props) => { const [modalListVisible, setModalListVisible] = useState(false); const HandleAnimation = (event) => { + const height = event.nativeEvent.layout.height LayoutAnimation.configureNext(LayoutAnimation.create(200, 'easeInEaseOut', 'opacity')) - setHeight(event.nativeEvent.layout.height) - // console.log("height changed: ", event.nativeEvent.layout.height) + setHeight(height) + // console.log(height) } const removeList = () => { diff --git a/src/components/Home/GroceryCard.js b/src/components/Home/GroceryCard.js index 8f44c32..e0d543e 100644 --- a/src/components/Home/GroceryCard.js +++ b/src/components/Home/GroceryCard.js @@ -11,8 +11,7 @@ const GroceryCard = (props) => { return ( navigation.navigate('Groceries')}> Groceries - - + ) } diff --git a/src/components/Home/styles/groceryCard.js b/src/components/Home/styles/groceryCard.js index 4c725bb..530e9f6 100644 --- a/src/components/Home/styles/groceryCard.js +++ b/src/components/Home/styles/groceryCard.js @@ -31,14 +31,19 @@ export const TextCard = styled(Text)` color: ${props => props.theme.colors.textW2}; background-color: #0003; ` -const Coffee = () => -export const IconCoffee = styled(Coffee)` - margin-top: 15px; +export const IconCoffee = styled(MaterialCommunityIcons).attrs({ + name: 'coffee' +})` + color: ${props => props.theme.colors.primaryVar}; + font-size: 70px; + margin-top: 10px; ` -const Meal = () => - -export const IconRecipe = styled(Meal)` - margin-top: 15px; +export const IconRecipe = styled(MaterialCommunityIcons).attrs({ + name: 'noodles' +})` + color: ${props => props.theme.colors.primaryVar}; + font-size: 70px; + margin-top: 10px; ` \ No newline at end of file diff --git a/src/components/recipes/addRecipe/Buttons.js b/src/components/recipes/addRecipe/Buttons.js index 61d31f4..c85c354 100644 --- a/src/components/recipes/addRecipe/Buttons.js +++ b/src/components/recipes/addRecipe/Buttons.js @@ -17,7 +17,7 @@ import { TouchableOpacity } from "react-native-gesture-handler"; export const AddRecipeButton = () => { let navigation = useNavigation() return ( - navigation.navigate('AddRecipe', {id: ""})}> + navigation.navigate('Add a recipe', {id: ""})}> ) @@ -59,7 +59,7 @@ export const OptionsButtonRecipe = (props) => { handleRemove()} > - navigation.navigate("AddRecipe", { id: props.id })} > + navigation.navigate("Add a recipe", { id: props.id })} > diff --git a/src/pages/recipes/Recipe.js b/src/pages/recipes/Recipe.js index 296f766..1e8df0e 100644 --- a/src/pages/recipes/Recipe.js +++ b/src/pages/recipes/Recipe.js @@ -10,7 +10,7 @@ import { OptionsButtonRecipe, AddIngredientsButton } from "../../components/reci import { ScrollView, Text, View } from "react-native" import HeaderPadding from "../../components/Header" -const Recipe = ({route, navigation}) => { +const Recipe = ({ route, navigation }) => { const id = route.params.id const recipe = useSelector(state => findRecipeById(state, id)) const IngredientList = recipe.ingredients.map((ingredient, index) => { @@ -28,17 +28,17 @@ const Recipe = ({route, navigation}) => { React.useLayoutEffect(() => { navigation.setOptions({ - headerRight: () => ( - - ), + headerRight: () => ( + + ), }); - }, [navigation]); + }, [navigation]); return ( <> - - {recipe.image != "" && } + + {recipe.image != "" && } {recipe.name}