mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-08 15:05:22 +02:00
fix: Use baseUrl from env in AxiosProvider
This commit is contained in:
parent
b2b329e692
commit
845418e5aa
2 changed files with 3 additions and 3 deletions
|
@ -83,7 +83,7 @@ export default function App({
|
|||
<Analytics />
|
||||
<QueryProvider>
|
||||
<SessionProvider>
|
||||
<AxiosProvider>
|
||||
<AxiosProvider baseUrl={env.NEXT_PUBLIC_API_URL}>
|
||||
<>
|
||||
<APM />
|
||||
{Page.isPublic === true ? (
|
||||
|
|
|
@ -67,8 +67,8 @@ function createInstance(options?: CreateInstanceOptions) {
|
|||
return instance
|
||||
}
|
||||
|
||||
export function AxiosProvider({ children }: PropsWithChildren) {
|
||||
const API_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:3333'
|
||||
export function AxiosProvider({ children, baseUrl }: PropsWithChildren<{baseUrl: string?}>) {
|
||||
const API_URL = baseUrl || 'http://localhost:3333'
|
||||
|
||||
// Expose a default instance with auth, superjson, headers
|
||||
const defaultInstance = useMemo(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue