Year Js
Year Js
Year Js
const data = [
{
name: 'Luffy',
year: '1973',
gh: 'TGH',
room: 'T-abc',
},
{
name: 'Naruto',
year: '1983',
gh: 'SAM',
room: 'S-abc',
},
{
name: 'Goku',
year: '1998',
gh: 'TGH',
room: 'Tbcd',
},
{
name: 'Sasuke',
year: '1983',
gh: 'SAM',
room: 'S-bcd',
}
];
const data2 = [
{
name: 'Luffy',
year: '1973',
gh: 'TGH',
room: 'T-abc',
},
];
return (
<SafeAreaView style={styles.container}>
<View style={styles.listTab}>
{listTab.map((e) => (
<TouchableOpacity
style={[styles.btnTab, year === e.year && styles.btnTabActive]}
onPress={() => setYearFilter(e.year)}>
<Text
style={(styles.textTab, year === e.year && styles.textTabActive)}>
{e.year}
</Text>
</TouchableOpacity>
))}
</View>
<FlatList
data={datalist}
keyExtractor={(e, i) => i.toString()}
renderItem={renderItem}
ItemSeparatorComponent={separator}
/>
</SafeAreaView>
);
};
export default Accoy;