fix(client-config): set isLoaded to false on API status update (#12371)
Attempt at #12289 (edit Félix: removed fix keyword since I don't think it fixes it) --------- Co-authored-by: Félix Malfait <felix.malfait@gmail.com> Co-authored-by: Félix Malfait <felix@twenty.com>
This commit is contained in:
@ -1,11 +1,8 @@
|
||||
import { loadDevMessages, loadErrorMessages } from '@apollo/client/dev';
|
||||
import { useEffect } from 'react';
|
||||
import { useRecoilValue } from 'recoil';
|
||||
|
||||
import { isDebugModeState } from '@/client-config/states/isDebugModeState';
|
||||
|
||||
export const ApolloDevLogEffect = () => {
|
||||
const isDebugMode = useRecoilValue(isDebugModeState);
|
||||
const isDebugMode = process.env.IS_DEBUG_MODE === 'true';
|
||||
|
||||
useEffect(() => {
|
||||
if (isDebugMode) {
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import { isDebugModeState } from '@/client-config/states/isDebugModeState';
|
||||
import { useRecoilTransactionObserver_UNSTABLE, useRecoilValue } from 'recoil';
|
||||
import { useRecoilTransactionObserver_UNSTABLE } from 'recoil';
|
||||
|
||||
import { logDebug } from '~/utils/logDebug';
|
||||
|
||||
@ -15,7 +14,7 @@ const formatTitle = (stateName: string) => {
|
||||
};
|
||||
|
||||
export const RecoilDebugObserverEffect = () => {
|
||||
const isDebugMode = useRecoilValue(isDebugModeState);
|
||||
const isDebugMode = process.env.IS_DEBUG_MODE === 'true';
|
||||
|
||||
useRecoilTransactionObserver_UNSTABLE(({ snapshot }) => {
|
||||
if (!isDebugMode) {
|
||||
|
||||
Reference in New Issue
Block a user