File tree Expand file tree Collapse file tree
src/frontend/src/pages/SettingsPage Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,6 +107,7 @@ const SettingsPageBase = ({
107107const SettingsPageWithClerk = ( ) => {
108108 const { openUserProfile, openOrganizationProfile } = useClerk ( ) ;
109109 const { organization, isLoaded : isOrganizationLoaded } = useOrganization ( ) ;
110+ const isAdmin = useAuthStore ( ( state ) => state . isAdmin ) ;
110111
111112 const canManageMembers = Boolean (
112113 isOrganizationLoaded && organization ?. id && openOrganizationProfile ,
@@ -144,16 +145,20 @@ const SettingsPageWithClerk = () => {
144145 onClick : handleManageMembers ,
145146 disabled : ! canManageMembers ,
146147 } ,
147- {
148- title : "Admin" ,
149- href : "/admin" ,
150- icon : (
151- < ForwardedIconComponent
152- name = "Shield"
153- className = "w-4 flex-shrink-0 justify-start stroke-[1.5]"
154- />
155- ) ,
156- } ,
148+ ...( isAdmin
149+ ? [
150+ {
151+ title : "Admin" ,
152+ href : "/admin" ,
153+ icon : (
154+ < ForwardedIconComponent
155+ name = "Shield"
156+ className = "w-4 flex-shrink-0 justify-start stroke-[1.5]"
157+ />
158+ ) ,
159+ } satisfies SidebarNavItem ,
160+ ]
161+ : [ ] ) ,
157162 {
158163 title : "Debugging" ,
159164 href : "/settings/debugging" ,
You can’t perform that action at this time.
0 commit comments