oportunidades 7
tests / ci (push) Waiting to run

This commit is contained in:
2026-10-13 11:40:29 +02:00
parent 20971d523f
commit 287e991486
2902 changed files with 1085456 additions and 25957 deletions
@@ -1,9 +1,9 @@
import { useEffect, useState } from "react";
import TerritoryGeometryPreview from "./territory-geometry-preview";
import { useEffect, useState } from 'react';
import TerritoryGeometryPreview from './territory-geometry-preview';
import InteractiveInvestmentMap, {
type InvestmentMapFeature,
type InvestmentMapArea,
} from "./interactive-investment-map";
} from './interactive-investment-map';
export default function InvestmentMapPanel({
filters,
@@ -17,7 +17,7 @@ export default function InvestmentMapPanel({
const [missing, setMissing] = useState<
{ id: number; title: string; url: string }[]
>([]);
const [error, setError] = useState("");
const [error, setError] = useState('');
const [areas, setAreas] = useState<InvestmentMapArea[]>([]);
useEffect(() => {
const controller = new AbortController();
@@ -26,10 +26,10 @@ export default function InvestmentMapPanel({
setAreas([]);
fetch(`/api/v1/investment/map?${params}`, {
signal: controller.signal,
headers: { Accept: "application/json" },
headers: { Accept: 'application/json' },
})
.then(async (response) => {
if (!response.ok) throw new Error("Mapa indisponível.");
if (!response.ok) throw new Error('Mapa indisponível.');
return response.json();
})
.then((data) => {
@@ -39,8 +39,8 @@ export default function InvestmentMapPanel({
setMissing(data.unlocated ?? []);
setError(
data.truncated
? "Cobertura limitada: refine os filtros."
: "",
? 'Cobertura limitada: refine os filtros.'
: '',
);
})
.catch((e) => {
@@ -61,7 +61,7 @@ export default function InvestmentMapPanel({
filters.district_id ||
filters.province_id ||
filters.geo_location_id ||
"",
'',
)
}
/>