Skip to content

Commit

Permalink
Merge pull request #68 from fuzue/56-make-it-clear-that-it-is-italy-o…
Browse files Browse the repository at this point in the history
…nly-for-now

56 make it clear that it is italy only for now
  • Loading branch information
aivuk authored Aug 24, 2023
2 parents 95566d1 + 7ba03c3 commit cd02e24
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 14 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ The concept behind this project was to create a simple and scalable solution, ma
The project is written in React/Typescript, using [MUI](https://mui.com/) library for the UI. The Android app is built using [Capacitor](https://capacitorjs.com/).

## First Release (August 2023)

This first release has only data for one country, 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

Expand Down
1 change: 1 addition & 0 deletions public/locales/en/translation.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
1 change: 1 addition & 0 deletions public/locales/it/translation.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
5 changes: 4 additions & 1 deletion src/components/AboutDialog.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import { DialogTitle, DialogContent, DialogContentText, }
import { DialogTitle, DialogContent, DialogContentText, Typography }
from "@mui/material"

//dialog box that opens with each element clicked
Expand All @@ -26,6 +26,9 @@ export default function AboutDialog() {
small-scale farmers, and ultimately reduce our contribution to global
warming.
</p>
<Typography sx={{fontWeight: 600}}>
At the moment it is only available for Italian products.
</Typography>
</DialogContentText>
</DialogContent>
</>
Expand Down
15 changes: 7 additions & 8 deletions src/components/HeaderBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
alpha,
Toolbar,
IconButton,
InputBase,
InputBase
} from "@mui/material";

type Props = {
Expand Down Expand Up @@ -45,14 +45,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)
Expand Down Expand Up @@ -110,16 +110,14 @@ export default function HeaderBar(props: Props) {
},
}));



return (
<AppBar position="static" sx={{mb: 1, backgroundColor:"primary.dark"}}>
<AppBar position="static" sx={{ mb: 1, backgroundColor: "primary.dark" }}>
<Toolbar>
{leftButton()}
<SearchBar>
<SearchIconWrapper>
<IconButton
sx={{m: 0}}
sx={{ m: 0 }}
size="large"
edge="start"
color="inherit"
Expand All @@ -141,3 +139,4 @@ export default function HeaderBar(props: Props) {
</AppBar>
);
}

2 changes: 1 addition & 1 deletion src/components/SideBarList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function SideBarList(props: any) {
>
<ListItem sx={{ my: 1.5 }}>
<Typography variant="h6" display="block" gutterBottom sx={{ m: 0 }}>
SEASONAL FOOD
SEASONAL FOOD 🇮🇹
</Typography>
</ListItem>
<Divider />
Expand Down

0 comments on commit cd02e24

Please sign in to comment.