general code clean up (#6)

This commit is contained in:
Florian Herrengt 2023-08-19 12:38:29 +01:00 committed by GitHub
parent 0bf569f647
commit 6e54086503
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 4 additions and 51 deletions

View File

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

3
src/containers/index.ts Normal file
View File

@ -0,0 +1,3 @@
export * from "./AuthIFrame";
export * from "./Chart";
export * from "./RenewToken";

View File

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

View File

@ -1,11 +1,3 @@
query currentUser {
me {
user {
id
}
}
}
mutation renewToken {
renewToken
}