Simplify SetItem
It had a pointless react fragment wrapping it's only element.
This commit is contained in:
parent
09354829a8
commit
1b2cbab370
58
SetItem.tsx
58
SetItem.tsx
|
@ -43,36 +43,34 @@ export default function SetItem({
|
||||||
}, [dark, ids, item.id])
|
}, [dark, ids, item.id])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<List.Item
|
||||||
<List.Item
|
onPress={press}
|
||||||
onPress={press}
|
title={item.name}
|
||||||
title={item.name}
|
description={`${item.reps} x ${item.weight}${item.unit || 'kg'}`}
|
||||||
description={`${item.reps} x ${item.weight}${item.unit || 'kg'}`}
|
onLongPress={longPress}
|
||||||
onLongPress={longPress}
|
style={{ backgroundColor }}
|
||||||
style={{ backgroundColor }}
|
left={() =>
|
||||||
left={() =>
|
settings.images &&
|
||||||
settings.images &&
|
item.image && (
|
||||||
item.image && (
|
<Image
|
||||||
<Image
|
source={{ uri: item.image }}
|
||||||
source={{ uri: item.image }}
|
style={{ height: 75, width: 75 }}
|
||||||
style={{ height: 75, width: 75 }}
|
/>
|
||||||
/>
|
|
||||||
)}
|
|
||||||
right={() => (
|
|
||||||
<>
|
|
||||||
{settings.showDate && (
|
|
||||||
<Text
|
|
||||||
style={{
|
|
||||||
alignSelf: 'center',
|
|
||||||
color: dark ? '#909090ff' : '#717171ff',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{format(new Date(item.created), settings.date || 'P')}
|
|
||||||
</Text>
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
)}
|
)}
|
||||||
/>
|
right={() => (
|
||||||
</>
|
<>
|
||||||
|
{settings.showDate && (
|
||||||
|
<Text
|
||||||
|
style={{
|
||||||
|
alignSelf: 'center',
|
||||||
|
color: dark ? '#909090ff' : '#717171ff',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{format(new Date(item.created), settings.date || 'P')}
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user