MCPcopy Create free account
hub / github.com/Thanas-R/Virdis / fetchToken

Function fetchToken

src/components/WeatherView.tsx:234–239  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

232
233 // Fetch mapbox token for crop planning map
234 useEffect(() => {
235 const fetchToken = async () => {
236 try {
237 const { data } = await callBackend("get-mapbox-token");
238 if (data?.token) setMapToken(data.token);
239 } catch (e) { console.error("Failed to fetch mapbox token for crop planning", e); }
240 };
241 fetchToken();
242 }, []);

Callers 1

WeatherViewFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected