mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-23 14:40:50 +01:00
Select avatar on me menu click
This commit is contained in:
parent
ff5f1d8038
commit
a9d4bd1559
@ -1,4 +1,6 @@
|
||||
import { FC } from 'react';
|
||||
import { RoomObjectCategory } from '@nitrots/nitro-renderer';
|
||||
import { FC, useEffect } from 'react';
|
||||
import { GetRoomEngine, GetRoomSession } from '../../../api';
|
||||
import { ToolbarViewItems } from '../ToolbarView.types';
|
||||
import { ToolbarMeViewProps } from './ToolbarMeView.types';
|
||||
|
||||
@ -6,6 +8,15 @@ export const ToolbarMeView: FC<ToolbarMeViewProps> = props =>
|
||||
{
|
||||
const { unseenAchievementCount = 0, handleToolbarItemClick = null } = props;
|
||||
|
||||
useEffect(() =>
|
||||
{
|
||||
const roomSession = GetRoomSession();
|
||||
|
||||
if(!roomSession) return;
|
||||
|
||||
GetRoomEngine().selectRoomObject(roomSession.roomId, roomSession.ownRoomIndex, RoomObjectCategory.UNIT);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className="d-flex nitro-toolbar-me px-1 py-2">
|
||||
<div className="navigation-items">
|
||||
|
Loading…
Reference in New Issue
Block a user