From e8d7e6ce64d09bb1f2b8f3e26f7aba250c3cca84 Mon Sep 17 00:00:00 2001 From: Innei Date: Fri, 8 Nov 2024 23:45:01 +0800 Subject: [PATCH 1/8] fix: don't cache user session Signed-off-by: Innei --- apps/renderer/src/queries/auth.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/renderer/src/queries/auth.ts b/apps/renderer/src/queries/auth.ts index fe6f74d13..160e698ed 100644 --- a/apps/renderer/src/queries/auth.ts +++ b/apps/renderer/src/queries/auth.ts @@ -24,6 +24,8 @@ export const useSession = (options?: { enabled?: boolean }) => { return !!(3 - failureCount) }, enabled: options?.enabled ?? true, + refetchOnMount: true, + staleTime: 0, meta: { persist: true, }, From 740783a537f85e0bc215cd38ce37bf5bd6fc9b1a Mon Sep 17 00:00:00 2001 From: Innei Date: Fri, 8 Nov 2024 23:49:16 +0800 Subject: [PATCH 2/8] fix: build Signed-off-by: Innei --- apps/renderer/src/pages/(main)/layout.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/renderer/src/pages/(main)/layout.tsx b/apps/renderer/src/pages/(main)/layout.tsx index b993d3e31..09392669f 100644 --- a/apps/renderer/src/pages/(main)/layout.tsx +++ b/apps/renderer/src/pages/(main)/layout.tsx @@ -30,7 +30,7 @@ import { ErrorComponentType } from "~/components/errors/enum" import { Kbd } from "~/components/ui/kbd/Kbd" import { PlainModal } from "~/components/ui/modal/stacked/custom-modal" import { DeclarativeModal } from "~/components/ui/modal/stacked/declarative-modal" -import { HotKeyScopeMap, isDev } from "~/constants" +import { HotKeyScopeMap, isDev, isWebBuild } from "~/constants" import { shortcuts } from "~/constants/shortcuts" import { useDailyTask } from "~/hooks/biz/useDailyTask" import { useAuthQuery, useI18n } from "~/hooks/common" @@ -63,7 +63,7 @@ const FooterInfo = () => { )} - {!ELECTRON && ( + {isWebBuild && (