Rocket.Chat.ReactNative/app/containers/MessageComposer/components/Unfocused/Left.tsx

23 lines
736 B
TypeScript
Raw Normal View History

2024-01-25 14:11:07 +00:00
import React from 'react';
import { View } from 'react-native';
import { useFocused, useShowEmojiKeyboard, useShowEmojiSearchbar } from '../../context';
import { ActionsButton } from '../Buttons';
import { MIN_HEIGHT } from '../../constants';
import { useRoomContext } from '../../../../views/RoomView/context';
export const Left = () => {
const { sharing } = useRoomContext();
const focused = useFocused();
const showEmojiKeyboard = useShowEmojiKeyboard();
const showEmojiSearchbar = useShowEmojiSearchbar();
if (focused || showEmojiKeyboard || showEmojiSearchbar || sharing) {
return null;
}
return (
<View style={{ height: MIN_HEIGHT, paddingRight: 12, justifyContent: 'center' }}>
<ActionsButton />
</View>
);
};