mirror of
https://github.com/aljazceru/landscape-template.git
synced 2026-01-28 10:44:23 +01:00
feat: update functions structure, re-enable project details info section
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { store } from '../redux/store';
|
||||
import { QueryClient, QueryClientProvider } from 'react-query'
|
||||
import { Provider } from 'react-redux';
|
||||
import { BrowserRouter } from 'react-router-dom'
|
||||
|
||||
@@ -18,11 +17,17 @@ import { useCallback, useLayoutEffect } from 'react';
|
||||
import { setIsMobileScreen } from 'src/redux/features/ui.slice';
|
||||
import { isMobileScreen } from './helperFunctions';
|
||||
|
||||
let apiClientUri = '/.netlify/functions/graphql';
|
||||
|
||||
if (process.env.REACT_APP_API_END_POINT)
|
||||
apiClientUri = process.env.REACT_APP_API_END_POINT
|
||||
|
||||
|
||||
const client = new ApolloClient({
|
||||
uri: 'http://localhost:8888/.netlify/functions/graphql',
|
||||
uri: apiClientUri,
|
||||
cache: new InMemoryCache()
|
||||
});
|
||||
const queryClient = new QueryClient()
|
||||
|
||||
|
||||
let basename = '/';
|
||||
|
||||
@@ -52,13 +57,11 @@ export default function Wrapper(props: any) {
|
||||
|
||||
return (
|
||||
<ApolloProvider client={client}>
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<Provider store={store}>
|
||||
<BrowserRouter basename={basename}>
|
||||
{props.children}
|
||||
</BrowserRouter>
|
||||
</Provider>
|
||||
</QueryClientProvider>
|
||||
<Provider store={store}>
|
||||
<BrowserRouter basename={basename}>
|
||||
{props.children}
|
||||
</BrowserRouter>
|
||||
</Provider>
|
||||
</ApolloProvider>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user