From 070f2a2045cf7fedbad095d26008754c153143d6 Mon Sep 17 00:00:00 2001 From: Matthew Russell Date: Fri, 16 Dec 2022 04:09:57 -0600 Subject: [PATCH] chore: remove unused page-query-container component (#2407) --- .../components/page-query-container/index.ts | 1 - .../page-query-container.tsx | 30 ------------------- 2 files changed, 31 deletions(-) delete mode 100644 apps/trading/components/page-query-container/index.ts delete mode 100644 apps/trading/components/page-query-container/page-query-container.tsx diff --git a/apps/trading/components/page-query-container/index.ts b/apps/trading/components/page-query-container/index.ts deleted file mode 100644 index 9f9785660..000000000 --- a/apps/trading/components/page-query-container/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { PageQueryContainer } from './page-query-container'; diff --git a/apps/trading/components/page-query-container/page-query-container.tsx b/apps/trading/components/page-query-container/page-query-container.tsx deleted file mode 100644 index c521eab56..000000000 --- a/apps/trading/components/page-query-container/page-query-container.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import type { OperationVariables, QueryHookOptions } from '@apollo/client'; -import { useQuery } from '@apollo/client'; -import type { DocumentNode } from 'graphql'; -import type { ReactNode } from 'react'; -import { AsyncRenderer } from '@vegaprotocol/ui-toolkit'; - -interface PageQueryContainerProps { - query: DocumentNode; - options?: QueryHookOptions; - render: (data: TData) => ReactNode; -} - -export const PageQueryContainer = ({ - query, - options, - render, -}: PageQueryContainerProps) => { - const { data, loading, error } = useQuery(query, { - ...options, - }); - - return ( - - loading={loading} - error={error} - data={data} - render={render} - /> - ); -};