mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-26 23:50:52 +01:00
Toolbar updates
This commit is contained in:
parent
64cd0bf215
commit
742ca4b548
@ -1,6 +1,6 @@
|
||||
import { UserInfoEvent } from 'nitro-renderer/src/nitro/communication/messages/incoming/user/data/UserInfoEvent';
|
||||
import { UserInfoDataParser } from 'nitro-renderer/src/nitro/communication/messages/parser/user/data/UserInfoDataParser';
|
||||
import { useCallback, useState } from 'react';
|
||||
import { FC, useCallback, useState } from 'react';
|
||||
import { AvatarEditorEvent, CatalogEvent, FriendListEvent, InventoryEvent, NavigatorEvent } from '../../events';
|
||||
import { dispatchUiEvent } from '../../hooks/events/ui/ui-event';
|
||||
import { CreateMessageHook } from '../../hooks/messages/message-event';
|
||||
@ -10,7 +10,7 @@ import { AvatarImageView } from '../avatar-image/AvatarImageView';
|
||||
import { ToolbarMeView } from './me/ToolbarMeView';
|
||||
import { ToolbarViewItems, ToolbarViewProps } from './ToolbarView.types';
|
||||
|
||||
export function ToolbarView(props: ToolbarViewProps): JSX.Element
|
||||
export const ToolbarView: FC<ToolbarViewProps> = props =>
|
||||
{
|
||||
const { isInRoom } = props;
|
||||
|
||||
@ -46,6 +46,7 @@ export function ToolbarView(props: ToolbarViewProps): JSX.Element
|
||||
return;
|
||||
case ToolbarViewItems.CLOTHING_ITEM:
|
||||
dispatchUiEvent(new AvatarEditorEvent(AvatarEditorEvent.TOGGLE_EDITOR));
|
||||
setMeExpanded(false);
|
||||
return;
|
||||
}
|
||||
}, []);
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { MouseEventType } from 'nitro-renderer';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { FC, useEffect, useRef } from 'react';
|
||||
import { ToolbarViewItems } from '../ToolbarView.types';
|
||||
import { ToolbarMeViewProps } from './ToolbarMeView.types';
|
||||
|
||||
export function ToolbarMeView(props: ToolbarMeViewProps): JSX.Element
|
||||
export const ToolbarMeView: FC<ToolbarMeViewProps> = props =>
|
||||
{
|
||||
const { setMeExpanded = null, handleToolbarItemClick = null } = props;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user