diff --git a/packages/web/src/contexts/AutomatischInfo.jsx b/packages/web/src/contexts/AutomatischInfo.jsx deleted file mode 100644 index 591e802e..00000000 --- a/packages/web/src/contexts/AutomatischInfo.jsx +++ /dev/null @@ -1,26 +0,0 @@ -import * as React from 'react'; -import { useQuery } from '@apollo/client'; -import { GET_AUTOMATISCH_INFO } from 'graphql/queries/get-automatisch-info'; -export const AutomatischInfoContext = React.createContext({ - isCloud: false, - isMation: false, - loading: true, -}); -export const AutomatischInfoProvider = (props) => { - const { children } = props; - const { data, loading } = useQuery(GET_AUTOMATISCH_INFO); - const isCloud = data?.getAutomatischInfo?.isCloud; - const isMation = data?.getAutomatischInfo?.isMation; - const value = React.useMemo(() => { - return { - isCloud, - isMation, - loading, - }; - }, [isCloud, isMation, loading]); - return ( - - {children} - - ); -}; diff --git a/packages/web/src/index.jsx b/packages/web/src/index.jsx index 33b53b9c..2d5e77e3 100644 --- a/packages/web/src/index.jsx +++ b/packages/web/src/index.jsx @@ -5,7 +5,6 @@ import ApolloProvider from 'components/ApolloProvider'; import SnackbarProvider from 'components/SnackbarProvider'; import MetadataProvider from 'components/MetadataProvider'; import { AuthenticationProvider } from 'contexts/Authentication'; -import { AutomatischInfoProvider } from 'contexts/AutomatischInfo'; import QueryClientProvider from 'components/QueryClientProvider'; import Router from 'components/Router'; import LiveChat from 'components/LiveChat/index.ee'; @@ -21,17 +20,15 @@ root.render( - - - - - {routes} + + + + {routes} - - - - - + + + +