mirror of
https://github.com/billsonnn/nitro-react.git
synced 2025-01-31 10:22:36 +01:00
Remove input
This commit is contained in:
parent
1e57726a13
commit
9f200a96a4
@ -1,10 +1,9 @@
|
||||
import { RoomInfoComposer } from 'nitro-renderer';
|
||||
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 { KeyboardEvent, MouseEvent, useCallback, useState } from 'react';
|
||||
import { MouseEvent, useCallback, useState } from 'react';
|
||||
import { NavigatorEvent } from '../../events';
|
||||
import { dispatchUiEvent } from '../../hooks/events/ui/ui-event';
|
||||
import { CreateMessageHook, SendMessageHook } from '../../hooks/messages/message-event';
|
||||
import { CreateMessageHook } from '../../hooks/messages/message-event';
|
||||
import { AvatarImageView } from '../avatar-image/AvatarImageView';
|
||||
import { ToolbarViewItems, ToolbarViewProps } from './ToolbarView.types';
|
||||
|
||||
@ -25,17 +24,6 @@ export function ToolbarView(props: ToolbarViewProps): JSX.Element
|
||||
setUserInfo(parser.userInfo);
|
||||
}, []);
|
||||
|
||||
function onKeyUp(event: KeyboardEvent<HTMLInputElement>)
|
||||
{
|
||||
if(event.key !== "Enter") return;
|
||||
|
||||
const roomId = (event.target as HTMLInputElement).value;
|
||||
|
||||
if(roomId.length === 0) return;
|
||||
|
||||
SendMessageHook(new RoomInfoComposer(parseInt(roomId), false, true));
|
||||
}
|
||||
|
||||
function handleToolbarItemClick(event: MouseEvent, item: string): void
|
||||
{
|
||||
event.preventDefault();
|
||||
@ -78,9 +66,6 @@ export function ToolbarView(props: ToolbarViewProps): JSX.Element
|
||||
{ (unseenFriendListCount > 0) && (
|
||||
<div className="position-absolute bg-danger px-1 py-0 rounded shadow count">{ unseenFriendListCount }</div>) }
|
||||
</li>
|
||||
<li>
|
||||
<input type="number" onKeyUp={ onKeyUp } />
|
||||
</li>
|
||||
<li className="list-group-item">
|
||||
{ userInfo && <AvatarImageView figure={ userInfo.figure } direction={ 2 } headOnly={ true } /> }
|
||||
{ (unseenAchievementsCount > 0) && (
|
||||
|
Loading…
x
Reference in New Issue
Block a user