Skip to content

Commit 6437a8c

Browse files
committed
fix: country page infinite requests on country info
1 parent 714cada commit 6437a8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/pages/country.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function CountryPage() {
2222
setCountryInfo(await getCountryInfo(country.name.common));
2323
};
2424
fetchCountryInfo();
25-
});
25+
}, [country]);
2626

2727
return (
2828
<section className="container bg-base-300 p-6 rounded-2xl">

0 commit comments

Comments
 (0)