Skip to content

Commit

Permalink
fix: Prevent global country update to go back to home page
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfauquette committed Dec 21, 2024
1 parent fb7d14a commit 58f0ccc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/Footer/DownloadOpenFoodFacts.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default function DownloadOpenFoodFacts() {
{footerLinks.map((link) => {
return (
<FooterButtons
key={link.title}
key={link.url}
title={t(`footer.${link.titleKey}.title`)}
subTitle={t(`footer.${link.titleKey}.subtitle`)}
icon={link.icon}
Expand Down
3 changes: 2 additions & 1 deletion src/contexts/CountryProvider/CountryProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ export function CountryProvider({ children }) {
}
setSearchParams((prev) => {
prev.set("country", newCountry);

return prev;
});
},
[],
[setSearchParams],
);

const value = React.useMemo(() => {
Expand Down
1 change: 0 additions & 1 deletion src/pages/ingredients/IngeredientDisplay.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as React from "react";

import Button from "@mui/material/Button";
import Stack from "@mui/material/Stack";
import Typography from "@mui/material/Typography";
Expand Down

0 comments on commit 58f0ccc

Please sign in to comment.