From 9e0010e150e8e25fc24c42d769b063af1e20a31f Mon Sep 17 00:00:00 2001 From: Stian Aune Date: Thu, 11 Apr 2019 21:04:15 +0200 Subject: [PATCH] =?UTF-8?q?=C3=98=C3=98=C3=98=C3=98.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webui/src/Components/Group.jsx | 2 +- webui/src/Components/Pages/AdminPage.jsx | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/webui/src/Components/Group.jsx b/webui/src/Components/Group.jsx index 68c7c53..b1b1f76 100644 --- a/webui/src/Components/Group.jsx +++ b/webui/src/Components/Group.jsx @@ -20,7 +20,7 @@ function Group({id, name, permissions}) { const noLights = ready && lights.length === 0; const hasLights = ready && lights.length > 0; - if (id === 0 && noLights) { + if (id === 0 && noLights && user.name !== "Admin") { return <>; } diff --git a/webui/src/Components/Pages/AdminPage.jsx b/webui/src/Components/Pages/AdminPage.jsx index 8ebdf68..30897f4 100644 --- a/webui/src/Components/Pages/AdminPage.jsx +++ b/webui/src/Components/Pages/AdminPage.jsx @@ -1,13 +1,7 @@ import React from "react"; import Bridges from "../Bridges"; -import useAuth from "../../Hooks/auth"; function AdminPage() { - const {user} = useAuth(); - if (user.name === "Admin") { - return <>; - } - return (