MCPcopy Create free account
hub / github.com/developmentseed/stac-react / fetchCollections

Function fetchCollections

src/hooks/useCollections.ts:17–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15 const { stacApi } = useStacApiContext();
16
17 const fetchCollections = async (): Promise<CollectionsResponse> => {
18 if (!stacApi) throw new Error('No STAC API configured');
19 const response: Response = await stacApi.getCollections();
20 return handleStacResponse<CollectionsResponse>(response);
21 };
22
23 const {
24 data: collections,

Callers

nothing calls this directly

Calls 2

handleStacResponseFunction · 0.90
getCollectionsMethod · 0.80

Tested by

no test coverage detected