upgrade from feature flag branch

This commit is contained in:
Oleg Isonen committed 2022-07-08 11:46:56 +02:00
1 parent 238ce327b8
commit d29f249bc6
2 files changed
+4 -3

No files matched your search

@@ -19,7 +19,7 @@ import {
useIsShareDialogOpen,
useIsPublishDialogOpen,
} from "~/designer/shared/nano-states";
import { feature } from "~/shared/feature-flags";
import { isFeatureEnabled } from "~/shared/feature-flags";
import { getSetting } from "~/designer/shared/client-settings";
const menuItemCss = {
@@ -36,7 +36,7 @@ const textCss = {
};
const ThemeMenuItem = () => {
if (feature("theme") === false) return null;
if (isFeatureEnabled("theme") === false) return null;
const currentTheme = getSetting("theme");
@@ -55,6 +55,7 @@ const ThemeMenuItem = () => {
dark: "Dark",
system: "System theme",
} as const;
const themes = Object.keys(labels) as Array<keyof typeof labels>;
return (
@@ -39,7 +39,7 @@ export const setSetting = (name: Name, value: Value) => {
if (isValidValue) write({ ...settings, [name]: value });
};
export const useSubscribeClientSetting = (name: Name) => {
export const useSubscribeClientSetting = () => {
useSubscribe<"setClientSetting", { name: Name; value: Value }>(
"setClientSetting",
(payload) => {