From aa97a2f430e59324d8453a76d248004124af7b25 Mon Sep 17 00:00:00 2001 From: dank074 Date: Sat, 16 Oct 2021 03:10:53 -0500 Subject: [PATCH] add rights check to mod tool icon --- src/views/toolbar/ToolbarView.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/views/toolbar/ToolbarView.tsx b/src/views/toolbar/ToolbarView.tsx index 34b1ac71..1e9fbab2 100644 --- a/src/views/toolbar/ToolbarView.tsx +++ b/src/views/toolbar/ToolbarView.tsx @@ -29,6 +29,7 @@ export const ToolbarView: FC = props => const [ unseenInventoryCount, setUnseenInventoryCount ] = useState(0); const [ unseenAchievementCount, setUnseenAchievementCount ] = useState(0); + const isMod = GetSessionDataManager().isModerator; const unseenFriendListCount = 0; const onUserInfoEvent = useCallback((event: UserInfoEvent) => @@ -200,9 +201,10 @@ export const ToolbarView: FC = props =>
handleToolbarItemClick(ToolbarViewItems.CAMERA_ITEM) }>
) } -
handleToolbarItemClick(ToolbarViewItems.MOD_TOOLS_ITEM) }> + { isMod && ( +
handleToolbarItemClick(ToolbarViewItems.MOD_TOOLS_ITEM) }> -
+
) }