feat: update functions structure, re-enable project details info section

This commit is contained in:
MTG2000
2022-03-24 16:29:33 +02:00
parent 583af8045a
commit edefc460c5
19 changed files with 8293 additions and 147 deletions

View File

@@ -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>
)
}