Show the toggle conditionally

The toggle button should only show if the environment variable is defined
This commit is contained in:
ajnart
2023-03-02 20:04:25 +09:00
parent f906214fa9
commit 46938db8f3
2 changed files with 2 additions and 1 deletions

1
.env Normal file
View File

@@ -0,0 +1 @@
DISABLE_EDIT_MODE=TRUE

View File

@@ -26,7 +26,7 @@ export function SettingsMenu({ newVersionAvailable }: { newVersionAvailable: str
</Menu.Target>
<Menu.Dropdown>
<ColorSchemeSwitch />
<EditModeToggle />
{process.env.EDIT_MODE_PASSWORD !== undefined && <EditModeToggle />}
<Menu.Divider />
{!editModeEnabled && (
<Menu.Item icon={<IconSettings strokeWidth={1.2} size={18} />} onClick={drawer.open}>