You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

GifMessage.js 566B

123456789101112131415161718192021222324252627
  1. import React from 'react';
  2. import { Image, View } from 'react-native';
  3. import { GIF_PREFIX } from '../../../gifs/constants';
  4. import styles from './styles';
  5. type Props = {
  6. /**
  7. * The formatted gif message.
  8. */
  9. message: string
  10. }
  11. const GifMessage = ({ message }: Props) => {
  12. const url = message.substring(GIF_PREFIX.length, message.length - 1);
  13. return (<View
  14. style = { styles.gifContainer }>
  15. <Image
  16. source = {{ uri: url }}
  17. style = { styles.gifImage } />
  18. </View>);
  19. };
  20. export default GifMessage;