recoil debugging logs
This commit is contained in:
parent
d74423b02f
commit
8a5990a69a
@ -27,7 +27,7 @@ import {
|
||||
LoadedScrollingEnd,
|
||||
LoadedValueScrolling,
|
||||
} from './loadables';
|
||||
import { guildState } from './atoms';
|
||||
import { guildsManagerState, guildState } from './atoms';
|
||||
import { Changes } from '../../data-types';
|
||||
import { randomUUID } from 'crypto';
|
||||
|
||||
@ -51,6 +51,8 @@ export function createFetchValueFunc<T>(
|
||||
LOG.debug(`${fvfId} awaiting getPromise(guildState(${guildId}))`);
|
||||
const guild = await getPromise(guildState(guildId));
|
||||
LOG.debug(`${fvfId} got guild from gm for g#${guildId}: ${guild}`);
|
||||
const guildsManager = await getPromise(guildsManagerState);
|
||||
LOG.debug(`${fvfId} got gm - ${guildsManager?.guilds.length} guilds, ${guildsManager}`);
|
||||
if (guild === null) return; // NOTE: This would only happen if this atom is created before its corresponding guild exists in the guildsManager
|
||||
|
||||
const selfState = await getPromise(node);
|
||||
|
@ -554,6 +554,7 @@ export function useInitRecoil(guildsManager: GuildsManager) {
|
||||
const setGuilds = useSetRecoilState(allGuildsState);
|
||||
const [currGuildId, setCurrGuildId] = useRecoilState(currGuildIdState);
|
||||
useEffect(() => {
|
||||
LOG.debug(`setting guildsManager to ${guildsManager?.guilds.length}`);
|
||||
setGuildsManager(guildsManager);
|
||||
}, [guildsManager, setGuildsManager]);
|
||||
useEffect(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user