Removing Prisma and Grapql-nestjs-prisma resolvers (#2574)
* Some cleaning * Fix seeds * Fix all sign in, sign up flow and apiKey optimistic rendering * Fix
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useRecoilState, useSetRecoilState } from 'recoil';
|
||||
import { useEffect } from 'react';
|
||||
import { useSetRecoilState } from 'recoil';
|
||||
|
||||
import { authProvidersState } from '@/client-config/states/authProvidersState';
|
||||
import { isDebugModeState } from '@/client-config/states/isDebugModeState';
|
||||
@ -11,13 +11,12 @@ import { useGetClientConfigQuery } from '~/generated/graphql';
|
||||
export const ClientConfigProvider: React.FC<React.PropsWithChildren> = ({
|
||||
children,
|
||||
}) => {
|
||||
const [, setAuthProviders] = useRecoilState(authProvidersState);
|
||||
const [, setIsDebugMode] = useRecoilState(isDebugModeState);
|
||||
const setAuthProviders = useSetRecoilState(authProvidersState);
|
||||
const setIsDebugMode = useSetRecoilState(isDebugModeState);
|
||||
|
||||
const [, setIsSignInPrefilled] = useRecoilState(isSignInPrefilledState);
|
||||
const setIsSignInPrefilled = useSetRecoilState(isSignInPrefilledState);
|
||||
|
||||
const [, setTelemetry] = useRecoilState(telemetryState);
|
||||
const [setIsLoading] = useState(true);
|
||||
const setTelemetry = useSetRecoilState(telemetryState);
|
||||
const setSupportChat = useSetRecoilState(supportChatState);
|
||||
|
||||
const { data, loading } = useGetClientConfigQuery();
|
||||
@ -41,10 +40,8 @@ export const ClientConfigProvider: React.FC<React.PropsWithChildren> = ({
|
||||
setIsDebugMode,
|
||||
setIsSignInPrefilled,
|
||||
setTelemetry,
|
||||
setIsLoading,
|
||||
loading,
|
||||
setSupportChat,
|
||||
]);
|
||||
|
||||
return <>{children}</>;
|
||||
return loading ? <></> : <>{children}</>;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user