fix Button key not added

This commit is contained in:
ammarahm-ed
2020-09-21 13:02:01 +05:00
parent e66274e4b3
commit 0dfaf60d1b

View File

@@ -14,6 +14,7 @@ export const Button = ({
title = '', title = '',
icon, icon,
color = 'accent', color = 'accent',
key
}) => { }) => {
const [state, dispatch] = useTracked(); const [state, dispatch] = useTracked();
const {colors, tags, premiumUser} = state; const {colors, tags, premiumUser} = state;
@@ -22,6 +23,7 @@ export const Button = ({
return ( return (
<PressableButton <PressableButton
onPress={onPress} onPress={onPress}
key={key}
color={grayed ? colors.nav : usedColor} color={grayed ? colors.nav : usedColor}
selectedColor={grayed ? colors.nav : usedColor} selectedColor={grayed ? colors.nav : usedColor}
alpha={grayed ? (!colors.night ? -0.04 : 0.04) : -0.1} alpha={grayed ? (!colors.night ? -0.04 : 0.04) : -0.1}