* Proof of concept ComponentState * Migrate to createState and createFamilyState * Refactor * Fix * Fix tests * Fix lint * Fix tests * Re-enable coverage
19 lines
469 B
TypeScript
19 lines
469 B
TypeScript
import { useEffect } from 'react';
|
|
import { loadDevMessages, loadErrorMessages } from '@apollo/client/dev';
|
|
import { useRecoilValue } from 'recoil';
|
|
|
|
import { isDebugModeState } from '@/client-config/states/isDebugModeState';
|
|
|
|
export const ApolloDevLogEffect = () => {
|
|
const isDebugMode = useRecoilValue(isDebugModeState());
|
|
|
|
useEffect(() => {
|
|
if (isDebugMode) {
|
|
loadDevMessages();
|
|
loadErrorMessages();
|
|
}
|
|
}, [isDebugMode]);
|
|
|
|
return null;
|
|
};
|