您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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;