import moment from 'moment';
import React, {useCallback, useState, useRef} from 'react';
import {
  Image,
  Text,
  View,
  TouchableOpacity,
  Dimensions,
  StyleSheet,
} from 'react-native';
import FastImage from 'react-native-fast-image';
import {GifType, IMAGES} from '../../../values/images';
const windowWidth = Dimensions.get('window').width;
const QuotesComponent = ({quotation}) => {
  return (
    <View
      style={{
        borderWidth: 1,
        borderColor: 'white',
        backgroundColor: 'white',
        marginTop: 10,
        paddingTop: 30,
      }}>
      <View
        style={{
          justifyContent: 'center',
          alignItems: 'center',
          padding: 10,
        }}>
        <Text style={styles.textQuote}>
          {quotation.content
            ? quotation.content
            : `If you cannot do greats things, do small things in a great way`}
        </Text>
        <Text style={{color: 'black'}}>
          {quotation.name ? '-' + quotation.name : `-Napoleon Hill`}
        </Text>
      </View>
      <Image style={styles.bgQuote} source={IMAGES.BgQuote} />
    </View>
  );
};
const styles = StyleSheet.create({
  bgQuote: {
    width: windowWidth - 10,
    height: 120,
    resizeMode: 'contain',
  },
  textQuote: {
    color: '#084884',
    fontSize: 15,
    textAlign: 'right',
  },
});
export default QuotesComponent;
