Rocket.Chat.ReactNative/app/containers/MessageComposer/components/Quotes/Quotes.tsx

15 lines
445 B
TypeScript
Raw Normal View History

2024-01-25 14:11:07 +00:00
import React from 'react';
import { FlatList } from 'react-native';
import { Quote } from './Quote';
import { useRoomContext } from '../../../../views/RoomView/context';
export const Quotes = (): React.ReactElement | null => {
const { selectedMessages, action } = useRoomContext();
if (action !== 'quote') {
return null;
}
return <FlatList data={selectedMessages} renderItem={({ item }) => <Quote messageId={item} />} horizontal />;
};