mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-26 23:50:52 +01:00
Start ChatInputWidget hook
This commit is contained in:
parent
9915b0b3e4
commit
2eaf0495c8
18
src/hooks/rooms/widgets/useChatInputWidget.ts
Normal file
18
src/hooks/rooms/widgets/useChatInputWidget.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useRoom } from '../useRoom';
|
||||
|
||||
const useChatInputWidgetState = () =>
|
||||
{
|
||||
const [ isTyping, setIsTyping ] = useState<boolean>(false);
|
||||
|
||||
const { roomSession = null, widgetHandler = null } = useRoom();
|
||||
|
||||
useEffect(() =>
|
||||
{
|
||||
if(!isTyping || !roomSession) return;
|
||||
|
||||
|
||||
}, [ isTyping, roomSession ]);
|
||||
}
|
||||
|
||||
export const useChatInputWidget = useChatInputWidgetState;
|
Loading…
Reference in New Issue
Block a user