mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-23 14:40:50 +01:00
add rights check to mod tool icon
This commit is contained in:
parent
d4e44b888e
commit
aa97a2f430
@ -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>) }
|
||||||
<div className="navigation-item" onClick={ event => handleToolbarItemClick(ToolbarViewItems.MOD_TOOLS_ITEM) }>
|
{ isMod && (
|
||||||
|
<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>
|
||||||
|
Loading…
Reference in New Issue
Block a user