File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { createContext } from 'react';
44import StacApi from '../stac-api' ;
55import useStacApi from '../hooks/useStacApi' ;
66import type { CollectionsResponse } from '../types/stac' ;
7+ import { GenericObject } from '../types' ;
78
89type StacApiContextType = {
910 stacApi ?: StacApi ;
@@ -13,13 +14,14 @@ type StacApiContextType = {
1314
1415type StacApiProviderType = {
1516 apiUrl : string ;
16- children : React . ReactNode
17+ children : React . ReactNode ;
18+ options ?: GenericObject ;
1719}
1820
1921export const StacApiContext = createContext < StacApiContextType > ( { } as StacApiContextType ) ;
2022
21- export function StacApiProvider ( { children, apiUrl } : StacApiProviderType ) {
22- const { stacApi } = useStacApi ( apiUrl ) ;
23+ export function StacApiProvider ( { children, apiUrl, options } : StacApiProviderType ) {
24+ const { stacApi } = useStacApi ( apiUrl , options ) ;
2325 const [ collections , setCollections ] = useState < CollectionsResponse > ( ) ;
2426
2527 const contextValue = useMemo ( ( ) => ( {
You can’t perform that action at this time.
0 commit comments