diff --git a/README.md b/README.md
index b37c38e..07a0c39 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,11 @@
## About the app
-This project was developed to address a genuine challenge: determining the availability of fruits and vegetables in a new country or region. Despite searching for solutions and information, I couldn't find anything intuitive or capable of meeting my needs.
+This project was developed to address a genuine challenge: determining the availability of fruits and vegetables in a new country or region. Despite searching for solutions and information, we couldn't find anything intuitive or capable of meeting my needs.
The concept behind this project was to create a simple and scalable solution, making it easy to modify and expand the database for different countries or regions. The primary objective of this app is to promote the consumption of locally grown produce, empower small-scale farmers, and ultimately reduce our contribution to global warming.
-## First Release (August 2023)
+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 dat for **Italy only** ๐ฎ๐น. Also in this initial release we have a web version and an Android app, available in English and Italian.
## Roadmap
@@ -14,7 +15,7 @@ This first release has dat for **Italy only** ๐ฎ๐น. Also in this initial rel
* ๐ Create new ways of visualizing the food in season information, with full year diagrams.
* ๐ ๐ ๐ ๐ฅ ๐ Make it possible to select a group of fruits and vegetables and see all of them in a calendar.
* ๐ Add synonyms or variant names. Some fruits and vegetables have more than one name, depending of the country's region.
-*๐ขCreate a public dataset with all the information that we are gathering.
+* ๐ขCreate a public dataset with all the information that we are gathering.
* ๐ Release IOS version.
* Write it in [Svelte](https://svelte.dev/)!
@@ -25,7 +26,6 @@ Source of data for fruits and vegetables from [Slow Food Italy](https://www.slow
![season-fruit](assets/print-1.jpg)
-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/).
# How to use
diff --git a/src/App.tsx b/src/App.tsx
index 7897427..6fdf42e 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -28,7 +28,7 @@ export default function App() {
element={}
/>
}
/>
i.item)
};
- const navigate = useNavigate();
- const location = useLocation();
-
function leftButton() {
- if (location.pathname.split("/")[1] === "foodpage") {
- return (
- navigate(-1)}
- >
-
-
- );
- }
return (
({
boxShadow: "3px 4px 8px #888888",
overflow: "clip",
color: theme.palette.primary.light,
- backgroundColor: theme.palette.primary.main,
-
+ backgroundColor: theme.palette.primary.main,
}));
function Item(props: FoodObject) {
@@ -22,7 +21,7 @@ function Item(props: FoodObject) {
-
+
{
+ const { selectedMonthNum } = useParams();
+ const monthNum = Number(selectedMonthNum) - 1;
+
+ //variables to change month when pressing the arrows
+ const prevMonth = monthNum != 0 ? monthNum - 1 : 11;
+ const nextMonth = monthNum != 11 ? monthNum + 1 : 0;
+
+ //styled MUI arrows
+ const ArrowButton = styled(Link)(({ theme }) => ({
+ color: alpha(theme.palette.primary.light, 0.75),
+ "&:hover": {
+ color: alpha(theme.palette.primary.light, 0.95),
+ },
+ display: "flex",
+ alignItems: "center",
+ margin: theme.spacing(1),
+ width: "auto",
+ }));
+
+ const ShadowBox = styled(Stack)(({ theme }) => ({
+ boxShadow: `0 2px 4px ${theme.palette.secondary}`,
+ }));
+
+ return (
+
+ {selectedMonthNum ? (
+
+
+
+
+
+
+ {t(`month_${monthNum}`)}
+
+
+
+
+
+
+ ) : (
+
+
+
+ Return to current month
+
+
+ )}
+
+ );
+};
+
+export default MonthBar;
diff --git a/src/components/SearchResult.tsx b/src/components/SearchResult.tsx
index 6738368..692e53b 100644
--- a/src/components/SearchResult.tsx
+++ b/src/components/SearchResult.tsx
@@ -13,6 +13,7 @@ import { TransitionProps } from "@mui/material/transitions";
import { Close } from "@mui/icons-material";
type Props = {
+ currentSearch: string;
searchResults: FoodList;
ifSearched: boolean;
closeModal: () => void;
@@ -28,7 +29,7 @@ const Transition = forwardRef(function Transition(
});
function SearchResult(props: Props) {
- const { searchResults, ifSearched, closeModal } = props;
+ const { currentSearch, searchResults, ifSearched, closeModal } = props;
const foodItems = searchResults.map((item, key) => {
return ;
@@ -44,9 +45,10 @@ function SearchResult(props: Props) {
aria-describedby="the results of your search are shown here"
TransitionComponent={Transition}
>
-
+
+ Search: {currentSearch} ({
- color: alpha(theme.palette.primary.light, 0.75),
- "&:hover": {
- color: alpha(theme.palette.primary.light, 0.95),
- },
- display: "flex",
- alignItems: "center",
- margin: theme.spacing(1),
- width: "auto",
- }));
-
- const ShadowBox = styled(Stack)(({ theme }) => ({
- boxShadow: `0 2px 4px ${theme.palette.secondary}`,
- }));
-
return (
-
-
-
-
-
- {t(`month_${monthNum}`)}
-
-
-
-
- handleChange(value)}
variant="fullWidth"
- sx={{ fontWeight: 700, mt: 1 }}
+ sx={{ fontWeight: 700 }}
aria-label="tabs for the selection of fruits, vegetables or others"
>
({
- width: 80,
- padding: 10,
- aspectRatio: 2,
+ const GridBox = styled(Link)(({ theme }) => ({
display: "flex",
justifyContent: "center",
alignItems: "center",
- fontFamily: "Sans",
+ flexGrow: 1,
+ padding: 2,
+ width: '25%',
[theme.breakpoints.up('md')]: {
- width: 200,
fontSize: '1.125rem',
fontWeight: '400'
},
@@ -83,23 +81,22 @@ export default function FoodPage() {
return months.map((month) => {
let userNumber = Number(month) + 1;
return (
-
-
-