add rights check to mod tool icon

This commit is contained in:
dank074 2021-10-16 03:10:53 -05:00
parent d4e44b888e
commit aa97a2f430

View File

@ -29,6 +29,7 @@ export const ToolbarView: FC<ToolbarViewProps> = props =>
const [ unseenInventoryCount, setUnseenInventoryCount ] = useState(0); const [ unseenInventoryCount, setUnseenInventoryCount ] = useState(0);
const [ unseenAchievementCount, setUnseenAchievementCount ] = useState(0); const [ unseenAchievementCount, setUnseenAchievementCount ] = useState(0);
const isMod = GetSessionDataManager().isModerator;
const unseenFriendListCount = 0; const unseenFriendListCount = 0;
const onUserInfoEvent = useCallback((event: UserInfoEvent) => const onUserInfoEvent = useCallback((event: UserInfoEvent) =>
@ -200,9 +201,10 @@ export const ToolbarView: FC<ToolbarViewProps> = props =>
<div className="navigation-item" onClick={ event => handleToolbarItemClick(ToolbarViewItems.CAMERA_ITEM) }> <div className="navigation-item" onClick={ event => handleToolbarItemClick(ToolbarViewItems.CAMERA_ITEM) }>
<i className="icon icon-camera"></i> <i className="icon icon-camera"></i>
</div>) } </div>) }
{ isMod && (
<div className="navigation-item" onClick={ event => handleToolbarItemClick(ToolbarViewItems.MOD_TOOLS_ITEM) }> <div className="navigation-item" onClick={ event => handleToolbarItemClick(ToolbarViewItems.MOD_TOOLS_ITEM) }>
<i className="icon icon-modtools"></i> <i className="icon icon-modtools"></i>
</div> </div>) }
</div> </div>
<div id="toolbar-chat-input-container" className="d-flex align-items-center" /> <div id="toolbar-chat-input-container" className="d-flex align-items-center" />
</div> </div>