import { GiphyContent, GiphyGridView, GiphyMediaType } from '@giphy/react-native-sdk'; import React, { useCallback, useState } from 'react'; import { Image, Keyboard, Text, View } from 'react-native'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { useDispatch } from 'react-redux'; import { createGifSentEvent, sendAnalytics } from '../../../analytics'; import JitsiScreen from '../../../base/modal/components/JitsiScreen'; import { sendMessage } from '../../../chat/actions.any'; import { goBack } from '../../../mobile/navigation/components/conference/ConferenceNavigationContainerRef'; import ClearableInput from '../../../participants-pane/components/native/ClearableInput'; import { formatGifUrlMessage, getGifUrl } from '../../functions'; import styles from './styles'; const GifsMenu = () => { const [ searchQuery, setSearchQuery ] = useState(''); const dispatch = useDispatch(); const insets = useSafeAreaInsets(); const content = searchQuery === '' ? GiphyContent.trending({ mediaType: GiphyMediaType.Gif }) : GiphyContent.search({ searchQuery, mediaType: GiphyMediaType.Gif }); const sendGif = useCallback(e => { const url = getGifUrl(e.nativeEvent.media); sendAnalytics(createGifSentEvent()); dispatch(sendMessage(formatGifUrlMessage(url), true)); goBack(); }, []); const onScroll = useCallback(Keyboard.dismiss, []); return ( Powered by ); }; export default GifsMenu;