general code clean up (#6)
This commit is contained in:
parent
0bf569f647
commit
6e54086503
|
@ -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<boolean>(false);
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
export * from "./AuthIFrame";
|
||||
export * from "./Chart";
|
||||
export * from "./RenewToken";
|
|
@ -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<typeof useSiteByWebflowIdQuery>;
|
||||
export type SiteByWebflowIdLazyQueryHookResult = ReturnType<typeof useSiteByWebflowIdLazyQuery>;
|
||||
export type SiteByWebflowIdQueryResult = Apollo.QueryResult<SiteByWebflowIdQuery, SiteByWebflowIdQueryVariables>;
|
||||
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<CurrentUserQuery, CurrentUserQueryVariables>) {
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<CurrentUserQuery, CurrentUserQueryVariables>(CurrentUserDocument, options);
|
||||
}
|
||||
export function useCurrentUserLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<CurrentUserQuery, CurrentUserQueryVariables>) {
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<CurrentUserQuery, CurrentUserQueryVariables>(CurrentUserDocument, options);
|
||||
}
|
||||
export type CurrentUserQueryHookResult = ReturnType<typeof useCurrentUserQuery>;
|
||||
export type CurrentUserLazyQueryHookResult = ReturnType<typeof useCurrentUserLazyQuery>;
|
||||
export type CurrentUserQueryResult = Apollo.QueryResult<CurrentUserQuery, CurrentUserQueryVariables>;
|
||||
export const RenewTokenDocument = gql`
|
||||
mutation renewToken {
|
||||
renewToken
|
||||
|
|
|
@ -1,11 +1,3 @@
|
|||
query currentUser {
|
||||
me {
|
||||
user {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mutation renewToken {
|
||||
renewToken
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue