A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
web: fix old usage of hooks/useTheme
Abdullah Atta6643fb0d6368
diff --git a/apps/web/src/utils/web-extension-server.ts b/apps/web/src/utils/web-extension-server.tsindex db1e6c634..aad0c56d6 100644--- a/apps/web/src/utils/web-extension-server.ts+++ b/apps/web/src/utils/web-extension-server.ts@@ -30,12 +30,13 @@ import { h } from "./html";import { sanitizeFilename } from "@notesnook/common";import { attachFile } from "../components/editor/picker";import { getFormattedDate } from "@notesnook/common";-import { getTheme } from "../hooks/use-theme";+import { useStore as useThemeStore } from "../stores/theme-store";export class WebExtensionServer implements Server {async login() {+ const { colorScheme, darkTheme, lightTheme } = useThemeStore.getState();const user = await db.user?.getUser();- const theme = getTheme();+ const theme = colorScheme === "dark" ? darkTheme : lightTheme;if (!user) return { pro: false, theme };return { email: user.email, pro: isUserPremium(user), theme };}