Refactor tag screen to use FlashList
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -4,8 +4,8 @@ import { Chip } from 'react-native-paper';
|
||||
import { Tag } from '../database';
|
||||
import FontAwesome5 from 'react-native-vector-icons/FontAwesome5';
|
||||
|
||||
const TagChip = (properties: { tag: Tag }) => {
|
||||
const contrastColor = getContrastColor(properties.tag.color);
|
||||
const TagChip = ({ tag }: { tag: Tag }) => {
|
||||
const contrastColor = getContrastColor(tag.color);
|
||||
|
||||
return (
|
||||
<Chip
|
||||
@@ -15,11 +15,11 @@ const TagChip = (properties: { tag: Tag }) => {
|
||||
compact
|
||||
style={[
|
||||
{
|
||||
backgroundColor: properties.tag.color,
|
||||
backgroundColor: tag.color,
|
||||
},
|
||||
]}
|
||||
textStyle={{ color: contrastColor }}>
|
||||
{'#' + properties.tag.name}
|
||||
{'#' + tag.name}
|
||||
</Chip>
|
||||
);
|
||||
};
|
||||
|
Reference in New Issue
Block a user