diff --git a/src/App.tsx b/src/App.tsx index d5bae6d..0bd664e 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,9 +1,8 @@ import { ApolloProvider } from "@apollo/client"; import React, { useState } from "react"; import { apolloClient } from "./apolloClient"; -import { AuthIFrame } from "./components/AuthIFrame"; import { MetricDetailsPage } from "./pages"; -import { RenewToken } from "./components/RenewToken"; +import { RenewToken } from "./containers"; export const App: React.FC = () => { const [authReady, setAuthReady] = useState(false); diff --git a/src/components/AuthIFrame.tsx b/src/containers/AuthIFrame.tsx similarity index 100% rename from src/components/AuthIFrame.tsx rename to src/containers/AuthIFrame.tsx diff --git a/src/components/RenewToken.tsx b/src/containers/RenewToken.tsx similarity index 100% rename from src/components/RenewToken.tsx rename to src/containers/RenewToken.tsx diff --git a/src/containers/index.ts b/src/containers/index.ts new file mode 100644 index 0000000..eceadc6 --- /dev/null +++ b/src/containers/index.ts @@ -0,0 +1,3 @@ +export * from "./AuthIFrame"; +export * from "./Chart"; +export * from "./RenewToken"; diff --git a/src/generated/graphql.ts b/src/generated/graphql.ts index aacd21f..38f2271 100644 --- a/src/generated/graphql.ts +++ b/src/generated/graphql.ts @@ -862,11 +862,6 @@ export type SiteByWebflowIdQueryVariables = Exact<{ export type SiteByWebflowIdQuery = { __typename?: 'Query', siteByWebflowId: { __typename?: 'Site', id: string } }; -export type CurrentUserQueryVariables = Exact<{ [key: string]: never; }>; - - -export type CurrentUserQuery = { __typename?: 'Query', me?: { __typename?: 'Me', user: { __typename?: 'User', id: string } } | null | undefined }; - export type RenewTokenMutationVariables = Exact<{ [key: string]: never; }>; @@ -951,42 +946,6 @@ export function useSiteByWebflowIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOp export type SiteByWebflowIdQueryHookResult = ReturnType; export type SiteByWebflowIdLazyQueryHookResult = ReturnType; export type SiteByWebflowIdQueryResult = Apollo.QueryResult; -export const CurrentUserDocument = gql` - query currentUser { - me { - user { - id - } - } -} - `; - -/** - * __useCurrentUserQuery__ - * - * To run a query within a React component, call `useCurrentUserQuery` and pass it any options that fit your needs. - * When your component renders, `useCurrentUserQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useCurrentUserQuery({ - * variables: { - * }, - * }); - */ -export function useCurrentUserQuery(baseOptions?: Apollo.QueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(CurrentUserDocument, options); - } -export function useCurrentUserLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(CurrentUserDocument, options); - } -export type CurrentUserQueryHookResult = ReturnType; -export type CurrentUserLazyQueryHookResult = ReturnType; -export type CurrentUserQueryResult = Apollo.QueryResult; export const RenewTokenDocument = gql` mutation renewToken { renewToken diff --git a/src/graphql/user.graphql b/src/graphql/user.graphql index b7119d0..d0604ed 100644 --- a/src/graphql/user.graphql +++ b/src/graphql/user.graphql @@ -1,11 +1,3 @@ -query currentUser { - me { - user { - id - } - } -} - mutation renewToken { renewToken }