diff options
Diffstat (limited to 'src/components/common/LikeButton.tsx')
-rw-r--r-- | src/components/common/LikeButton.tsx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/components/common/LikeButton.tsx b/src/components/common/LikeButton.tsx index 28eff768..f817bd98 100644 --- a/src/components/common/LikeButton.tsx +++ b/src/components/common/LikeButton.tsx @@ -4,10 +4,15 @@ import {normalize} from '../../utils'; interface LikeButtonProps { onPress: () => void; + filled: boolean; style: ImageStyle; } -const LikeButton: React.FC<LikeButtonProps> = ({onPress, style}) => { - const [filled, setFilled] = useState(false); +const LikeButton: React.FC<LikeButtonProps> = ({ + onPress, + filled: initialFillState, + style, +}) => { + const [filled, setFilled] = useState(initialFillState); const uri = filled ? require('../../assets/images/heart-filled.png') : require('../../assets/images/heart-outlined.png'); |