motorin along
This commit is contained in:
@@ -12,6 +12,7 @@ type AppContextInterface = {
|
||||
post: <T, R = T>(path: string, body: Partial<T>) => Promise<R>
|
||||
create: <T>(path: string, body: Partial<T>) => Promise<T>
|
||||
destroy: (path: string) => Promise<string>
|
||||
baseURL?: string
|
||||
}
|
||||
|
||||
const AppContext = createContext<AppContextInterface | null>(null)
|
||||
@@ -52,7 +53,7 @@ export const AppContextProvider = ({ children, baseURL }: Props) => {
|
||||
}
|
||||
|
||||
return (
|
||||
<AppContext.Provider value={{ get, patch, post, create, destroy }}>
|
||||
<AppContext.Provider value={{ get, patch, post, create, destroy, baseURL }}>
|
||||
{children}
|
||||
</AppContext.Provider>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user