From 85547116f9892f2c46eacf901bc908c58880f76a Mon Sep 17 00:00:00 2001 From: Michael Peters Date: Sun, 23 Oct 2022 14:18:36 -0700 Subject: [PATCH] linting fixes --- src/client/webapp/auto-verifier.ts | 8 ++++---- src/client/webapp/elements/require/atoms-funcs.ts | 3 --- src/client/webapp/preload.tsx | 9 +++------ 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/client/webapp/auto-verifier.ts b/src/client/webapp/auto-verifier.ts index 2bd33a2..e179f22 100644 --- a/src/client/webapp/auto-verifier.ts +++ b/src/client/webapp/auto-verifier.ts @@ -176,10 +176,10 @@ export class AutoVerifier { this.trustedStatus = 'none'; } - // To consider: It may be possible to reduce the complexity of this function a bit. + // to consider: It may be possible to reduce the complexity of this function a bit. // TODO: Why not have fetcher and a simple dedup wrapper to remove some of the complexity from this function? - // This would likely make it possible to get rid of the "else" block in tryResolveTrustedPromise - // Make sure it would work properly for retry functionality + // this would likely make it possible to get rid of the "else" block in tryResolveTrustedPromise + // make sure it would work properly for retry functionality // can't because of primary promise early resolution // fetches the result of the primary fetchable @@ -311,7 +311,7 @@ export class AutoVerifier { } else { console.warn('trusted promise from another path rejected after unverify', e); // TODO: only retry if there is another trusted promise available... - // OR always reject? + // or maybe always reject? await tryResolveTrustedPromise(); return; } diff --git a/src/client/webapp/elements/require/atoms-funcs.ts b/src/client/webapp/elements/require/atoms-funcs.ts index dd56db9..ba5ed25 100644 --- a/src/client/webapp/elements/require/atoms-funcs.ts +++ b/src/client/webapp/elements/require/atoms-funcs.ts @@ -398,16 +398,13 @@ export function guildDataSubscriptionLoadableMultipleEffect< const effect: AtomEffect> = atomEffectParam => { const { trigger } = atomEffectParam; - /* LOG.debug(`multiple effect for guild #${guildId}`); */ const fetchValueFunc = createFetchValueFunc(atomEffectParam, guildId, fetchFunc); // fetch initial value on first get if (trigger === 'get') { (async () => { try { - /* LOG.debug('awaiting fetchValueFunc Multiple'); */ await fetchValueFunc(); - /* LOG.debug('done fetchValueFunc Multiple'); */ } catch (e: unknown) { LOG.error('error fetching initial value', e); } diff --git a/src/client/webapp/preload.tsx b/src/client/webapp/preload.tsx index 2a1556b..9f58c66 100644 --- a/src/client/webapp/preload.tsx +++ b/src/client/webapp/preload.tsx @@ -60,14 +60,11 @@ window.addEventListener('DOMContentLoaded', () => { LOG.silly('guildsManager initialized'); - // TODO: Try using initializeState from recoilRoot - // https://recoiljs.org/docs/api-reference/core/RecoilRoot/ const root = createRoot(document.getElementById('react-root')!); - function initializeState({ set }: MutableSnapshot): void { - set(guildsManagerState, guildsManager); - } root.render( - + { + set(guildsManagerState, guildsManager); + }}> , );