From e734af0109303f6b55885f4cf7d7b1264665c689 Mon Sep 17 00:00:00 2001 From: ajnart Date: Thu, 2 Mar 2023 16:43:54 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Remove=20logs=20and=20rephrase?= =?UTF-8?q?=20modal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../layout/header/SettingsMenu/EditModeToggle.tsx | 7 +++---- src/pages/api/configs/tryToggleEdit.tsx | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/layout/header/SettingsMenu/EditModeToggle.tsx b/src/components/layout/header/SettingsMenu/EditModeToggle.tsx index 083e889c9..5d4fda871 100644 --- a/src/components/layout/header/SettingsMenu/EditModeToggle.tsx +++ b/src/components/layout/header/SettingsMenu/EditModeToggle.tsx @@ -38,7 +38,8 @@ function ModalContent() { In order to toggle edit mode, you need to enter the password you entered in the - environment variable named EDIT_MODE_PASSWORD + environment variable named EDIT_MODE_PASSWORD . If it is not set, you are not + able to toggle edit mode on and off. - + ); diff --git a/src/pages/api/configs/tryToggleEdit.tsx b/src/pages/api/configs/tryToggleEdit.tsx index 406babdce..45f22e8f2 100644 --- a/src/pages/api/configs/tryToggleEdit.tsx +++ b/src/pages/api/configs/tryToggleEdit.tsx @@ -4,7 +4,6 @@ import { NextApiRequest, NextApiResponse } from 'next'; function Post(req: NextApiRequest, res: NextApiResponse) { const { tried } = req.body; // Try to match the password with the EDIT_PASSWORD env variable - Consola.log(req.body, process.env.EDIT_MODE_PASSWORD); if (tried === process.env.EDIT_MODE_PASSWORD) { process.env.DISABLE_EDIT_MODE = process.env.DISABLE_EDIT_MODE === 'true' ? 'false' : 'true'; return res.status(200).json({