From 2c2543b4d726664b0913ff3493b35b2e825232bc Mon Sep 17 00:00:00 2001
From: Sean Hatfield <seanhatfield5@gmail.com>
Date: Thu, 16 Nov 2023 14:37:42 -0800
Subject: [PATCH] fix settings button path on single user mode (#383)

Co-authored-by: timothycarambat <rambat1010@gmail.com>
---
 frontend/src/components/Sidebar/index.jsx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/frontend/src/components/Sidebar/index.jsx b/frontend/src/components/Sidebar/index.jsx
index 01484dd73..f0c27f09d 100644
--- a/frontend/src/components/Sidebar/index.jsx
+++ b/frontend/src/components/Sidebar/index.jsx
@@ -274,9 +274,12 @@ export function SidebarMobileHeader() {
 }
 
 function SettingsButton() {
+  const { user } = useUser();
   return (
     <a
-      href={paths.settings.system()}
+      href={
+       !!user?.role ? paths.settings.system() : paths.settings.appearance()
+      }
       className="transition-all duration-300 p-2 rounded-full text-white bg-sidebar-button hover:bg-menu-item-selected-gradient hover:border-slate-100 hover:border-opacity-50 border-transparent border"
     >
       <Wrench className="h-4 w-4" weight="fill" />
-- 
GitLab