citizenship_app_news
Version:
News module for Citizenship project application
39 lines (36 loc) • 2.46 kB
JavaScript
import React, { Component } from 'react';
import { View, Text, Image, ScrollView, TextInput, FlatList } from 'react-native';
import { Toolbar } from '.';
import { widthPercentageToDP as wp, heightPercentageToDP as hp } from 'react-native-responsive-screen'
import SafeAreaView, { getInset, withSafeArea } from 'react-native-safe-area-view';
import ImageSlider from 'react-native-image-slider';
import { Color, Integer, FontFamily, FontSize } from 'react-native-custom-style';
import LinearGradient from 'react-native-linear-gradient';
import { Ripple, Navigation } from '../../controllers';
class HomeScreen extends Component {
constructor(props) {
super(props);
this.state = {
covers: ["https://files.virgool.io/upload/users/16237/posts/jl5rz1pqxbqd/5sudpkj4wlha.jpeg", "https://www.eghamat24.com/blog/wp-content/uploads/2018/06/Borujerd-3.jpg",
"https://cdn.sarashpazpapion.com/files/pictures/org/2017/07/06/2e67d4ecaf0c960a989de44584bd92a4.jpg"],
data: [
{ id: 1, title: 'اخبار', keyword: 'NEWS', picture_url: 'https://www.aftabir.com/news/img/articles/2019-08-16-02-00-20.jpg' },
{ id: 1, title: 'سفارش غذا', keyword: 'FOODS', picture_url: 'https://files.virgool.io/upload/users/16237/posts/jl5rz1pqxbqd/5sudpkj4wlha.jpeg' },
{ id: 1, title: 'کسب و کار', keyword: 'BUSINESS', picture_url: 'https://cdn.fararu.com/files/fa/news/1398/1/20/493256_823.jpg' },
{ id: 1, title: 'کاریابی', keyword: 'EMPLOYMENT', picture_url: 'https://tabesh.edu.af/dari/wp-content/uploads/sites/2/2019/02/-%DA%A9%D8%A7%D8%B1%DB%8C%D8%A7%D8%A8%DB%8C-1-400x250.jpg' },
]
};
}
render() {
return (
<SafeAreaView style={{ backgroundColor: Color.STATUSBAR, height: '100%', width: wp('100%'), flexDirection: 'column', justifyContent: 'center', alignItems: 'center' }}>
<Text style={{ color: Color.TEXT_GO_CART, fontFamily: FontFamily.TITLE, fontSize: FontSize.TITLE }}>آخبار</Text>
<Ripple onPress={() => Navigation.navigate('TestScreen')}
style={{ height: hp('15%'), width: wp('50%'), backgroundColor: 'red' }}>
<Text style={{ color: Color.TEXT_GO_CART }}>Go</Text>
</Ripple>
</SafeAreaView>
);
}
}
export default HomeScreen;