feat(gifs/native): created GifsMenuFooter
This commit is contained in:
parent
a31cc62c25
commit
049a3eb7fb
|
@ -1,7 +1,6 @@
|
||||||
import { GiphyContent, GiphyGridView, GiphyMediaType } from '@giphy/react-native-sdk';
|
import { GiphyContent, GiphyGridView, GiphyMediaType } from '@giphy/react-native-sdk';
|
||||||
import React, { useCallback, useState } from 'react';
|
import React, { useCallback, useState } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { Image, Text, View } from 'react-native';
|
|
||||||
import { useDispatch } from 'react-redux';
|
import { useDispatch } from 'react-redux';
|
||||||
|
|
||||||
import { createGifSentEvent, sendAnalytics } from '../../../analytics';
|
import { createGifSentEvent, sendAnalytics } from '../../../analytics';
|
||||||
|
@ -10,7 +9,7 @@ import { sendMessage } from '../../../chat/actions.any';
|
||||||
import { goBack } from '../../../mobile/navigation/components/conference/ConferenceNavigationContainerRef';
|
import { goBack } from '../../../mobile/navigation/components/conference/ConferenceNavigationContainerRef';
|
||||||
import ClearableInput from '../../../participants-pane/components/native/ClearableInput';
|
import ClearableInput from '../../../participants-pane/components/native/ClearableInput';
|
||||||
import { formatGifUrlMessage, getGifUrl } from '../../functions';
|
import { formatGifUrlMessage, getGifUrl } from '../../functions';
|
||||||
|
import GifsMenuFooter from './GifsMenuFooter';
|
||||||
import styles from './styles';
|
import styles from './styles';
|
||||||
|
|
||||||
const GifsMenu = () => {
|
const GifsMenu = () => {
|
||||||
|
@ -34,19 +33,9 @@ const GifsMenu = () => {
|
||||||
goBack();
|
goBack();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|
||||||
const footerComponent = () => (
|
|
||||||
<View style = { styles.credit }>
|
|
||||||
<Text
|
|
||||||
style = { styles.creditText }>Powered by</Text>
|
|
||||||
<Image source = { require('../../../../../images/GIPHY_logo.png') } />
|
|
||||||
</View>
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<JitsiScreen
|
<JitsiScreen
|
||||||
/* eslint-disable-next-line react/jsx-no-bind */
|
footerComponent = { GifsMenuFooter }
|
||||||
footerComponent = { footerComponent }
|
|
||||||
style = { styles.container }>
|
style = { styles.container }>
|
||||||
<ClearableInput
|
<ClearableInput
|
||||||
customStyles = { styles.clearableInput }
|
customStyles = { styles.clearableInput }
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
import React from 'react';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { Image, Text, View } from 'react-native';
|
||||||
|
|
||||||
|
import styles from './styles';
|
||||||
|
|
||||||
|
const GifsMenuFooter = (): JSX.Element => {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
return(
|
||||||
|
<View style={ styles.credit }>
|
||||||
|
<Text
|
||||||
|
style={ styles.creditText }>{ t('poweredby') }</Text>
|
||||||
|
<Image
|
||||||
|
source = { require('../../../../../images/GIPHY_logo.png') } />
|
||||||
|
</View>
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
export default GifsMenuFooter
|
|
@ -12,7 +12,9 @@ export default {
|
||||||
marginTop: BaseTheme.spacing[3]
|
marginTop: BaseTheme.spacing[3]
|
||||||
},
|
},
|
||||||
|
|
||||||
input: { textAlign: 'left' }
|
input: {
|
||||||
|
textAlign: 'left'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
grid: {
|
grid: {
|
||||||
|
@ -34,7 +36,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
creditText: {
|
creditText: {
|
||||||
color: 'white',
|
color: BaseTheme.palette.text01,
|
||||||
fontWeight: 'bold'
|
fontWeight: 'bold'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue