From 40209cb627e6e382e28a604b206b180817590d81 Mon Sep 17 00:00:00 2001 From: Elena Volpato Date: Fri, 18 Aug 2023 16:31:18 +0200 Subject: [PATCH 1/4] FIX(): added flag to about and changed text do included italy only info --- public/locales/en/translation.json | 1 + public/locales/it/translation.json | 1 + src/components/AboutDialog.tsx | 3 ++- src/components/HeaderBar.tsx | 15 ++++++++------- src/components/SideBarList.tsx | 2 +- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index 8d06a5b..b32f7a8 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -1,6 +1,7 @@ { "Header_appTitle": "In season in Italy", "Header_searchBar": "Search...", + "Header_in_Italy": "Italy", "FoodOfTheMonth_fruitsTabText": "Fruits", "FoodOfTheMonth_vegetablesTabText": "Veggies", "FoodOfTheMonth_fruitsNumber_one": "{{fruits}} fruit", diff --git a/public/locales/it/translation.json b/public/locales/it/translation.json index 316e213..3e50fbe 100644 --- a/public/locales/it/translation.json +++ b/public/locales/it/translation.json @@ -1,6 +1,7 @@ { "Header_appTitle": "In stagione in Italia", "Header_searchBar": "Cerca...", + "Header_in_Italy": "Italia", "FoodOfTheMonth_fruitsTabText": "Frutti", "FoodOfTheMonth_vegetablesTabText": "Verdure", "FoodOfTheMonth_fruitsNumber_one": "{{fruits}} frutta", diff --git a/src/components/AboutDialog.tsx b/src/components/AboutDialog.tsx index 4092bf1..1852194 100644 --- a/src/components/AboutDialog.tsx +++ b/src/components/AboutDialog.tsx @@ -1,5 +1,5 @@ -import { DialogTitle, DialogContent, DialogContentText, } +import { DialogTitle, DialogContent, DialogContentText, Typography } from "@mui/material" //dialog box that opens with each element clicked @@ -26,6 +26,7 @@ export default function AboutDialog() { small-scale farmers, and ultimately reduce our contribution to global warming.

+ At the moment it is only available for Italian products. diff --git a/src/components/HeaderBar.tsx b/src/components/HeaderBar.tsx index 7331d57..8d2dbe1 100644 --- a/src/components/HeaderBar.tsx +++ b/src/components/HeaderBar.tsx @@ -12,6 +12,8 @@ import { Toolbar, IconButton, InputBase, + Typography, + Select, } from "@mui/material"; type Props = { @@ -46,14 +48,14 @@ export default function HeaderBar(props: Props) { const options = { threshold: 0.3, keys: [ - { name: 'name-en', getFn: (food:FoodObject) => food.description[0].name }, - { name: 'name-it', getFn: (food:FoodObject) => food.description[1].name } + { name: 'name-en', getFn: (food: FoodObject) => food.description[0].name }, + { name: 'name-it', getFn: (food: FoodObject) => food.description[1].name } ] } const fuse = new Fuse(food, options) const searchText = query.current.value.trim().toLowerCase() - const searchLanguage:{[lang:string]:string} = {} + const searchLanguage: { [lang: string]: string } = {} searchLanguage["name-" + i18next.language] = searchText return fuse.search(searchLanguage).map((i) => i.item) @@ -127,16 +129,14 @@ export default function HeaderBar(props: Props) { }, })); - - return ( - + {leftButton()} ); } + diff --git a/src/components/SideBarList.tsx b/src/components/SideBarList.tsx index 8b4ef67..2fd0fd4 100644 --- a/src/components/SideBarList.tsx +++ b/src/components/SideBarList.tsx @@ -22,7 +22,7 @@ export default function SideBarList(props: any) { > - SEASONAL FOOD + SEASONAL FOOD 🇮🇹 From c4d712df52ee09429111876c78fcece51254c8c8 Mon Sep 17 00:00:00 2001 From: Elena Volpato Date: Fri, 18 Aug 2023 16:31:48 +0200 Subject: [PATCH 2/4] organized the code --- src/components/AboutDialog.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/AboutDialog.tsx b/src/components/AboutDialog.tsx index 1852194..3986ff7 100644 --- a/src/components/AboutDialog.tsx +++ b/src/components/AboutDialog.tsx @@ -26,7 +26,9 @@ export default function AboutDialog() { small-scale farmers, and ultimately reduce our contribution to global warming.

- At the moment it is only available for Italian products. + + At the moment it is only available for Italian products. + From bbdae1a16ebc871e431f96a0364379ae83c73a32 Mon Sep 17 00:00:00 2001 From: Elena Volpato Date: Mon, 21 Aug 2023 12:37:57 +0200 Subject: [PATCH 3/4] reviewed italy only text in readME and added italian flag to it --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 0f043d6..b37c38e 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,7 @@ The concept behind this project was to create a simple and scalable solution, ma ## First Release (August 2023) -This first release has only data for one co, for now, the data is **only for Italy**. - -Also in this initial release we have a web version and an Android app, also available in English and Italian. +This first release has dat for **Italy only** 🇮🇹. Also in this initial release we have a web version and an Android app, available in English and Italian. ## Roadmap From 0b077970af243728860d5c3beee42aa2d6501b87 Mon Sep 17 00:00:00 2001 From: Elena Volpato Date: Thu, 24 Aug 2023 10:31:55 +0200 Subject: [PATCH 4/4] FIX(): removed mui components there weren't being used --- src/components/HeaderBar.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/HeaderBar.tsx b/src/components/HeaderBar.tsx index 8d2dbe1..1d8bbe1 100644 --- a/src/components/HeaderBar.tsx +++ b/src/components/HeaderBar.tsx @@ -11,9 +11,7 @@ import { alpha, Toolbar, IconButton, - InputBase, - Typography, - Select, + InputBase } from "@mui/material"; type Props = {