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
fix: ThemeFactory has no function called "transform"
thecodrr25573d417381
diff --git a/apps/web/src/components/theme-provider/index.js b/apps/web/src/components/theme-provider/index.jsindex 7f795ba74..e80ba09dc 100644--- a/apps/web/src/components/theme-provider/index.js+++ b/apps/web/src/components/theme-provider/index.js@@ -4,15 +4,15 @@ import { useStore } from "../../stores/theme-store";import ThemeFactory from "../../theme";import { injectCss } from "../../utils/css";+const factory = new ThemeFactory();+function ThemeProvider(props) {- const theme = useStore(store => store.theme);+ const themeType = useStore(store => store.theme);const accent = useStore(store => store.accent);- const factory = new ThemeFactory({ theme, accent, scale: 1 });injectCss(factory.transform("css"));+ const theme = factory.construct({ theme: themeType, accent, scale: 1 });return (- <EmotionThemeProvider theme={factory}>- {props.children}- </EmotionThemeProvider>+ <EmotionThemeProvider theme={theme}>{props.children}</EmotionThemeProvider>);}export default ThemeProvider;diff --git a/apps/web/src/theme/index.js b/apps/web/src/theme/index.jsindex b56885c7d..3f1c9ac50 100644--- a/apps/web/src/theme/index.js+++ b/apps/web/src/theme/index.js@@ -4,7 +4,11 @@ import FontFactory from "./font";import TransformerFactory from "./transformer";class ThemeFactory {- constructor(config) {+ transform(type) {+ return new TransformerFactory(type, this);+ }++ construct(config) {return {breakpoints: ["480px", "1000px", "1000px"],space: [0, 5, 10, 15, 20, 25, 30, 35],@@ -15,10 +19,6 @@ class ThemeFactory {...new VariantsFactory()};}-- transform(type) {- return new TransformerFactory(type, this);- }}export default ThemeFactory;