Skip to content

Commit

Permalink
無限ループを防ぐ
Browse files Browse the repository at this point in the history
  • Loading branch information
yuiseki committed Dec 24, 2024
1 parent f722ad4 commit d1cdaf9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/app/voyager/MyMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const CountriesDisastersMap: React.FC = () => {
const router = useRouter();

useEffect(() => {
if (geoJSON) return;
// サンプルとして固定されたパスのGeoJSONを取得
const year = "2024";
const month = "12";
Expand Down
1 change: 1 addition & 0 deletions src/app/voyager/[country]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const CountryDisasters: React.FC = () => {

useEffect(() => {
if (!country) return;
if (disasters && disasters.length > 0) return;

const fetchDisasters = async () => {
setLoading(true);
Expand Down

0 comments on commit d1cdaf9

Please sign in to comment.