From d7307e5b368ffee3cb76083c14d287be2defdc22 Mon Sep 17 00:00:00 2001 From: teodorus-nathaniel Date: Sat, 27 Jan 2024 00:31:09 +0700 Subject: [PATCH] feat: hide creator rewards if no data for it --- src/components/creators/rewards/RewardInfo.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/creators/rewards/RewardInfo.tsx b/src/components/creators/rewards/RewardInfo.tsx index 455d37ef0..9315e6f77 100644 --- a/src/components/creators/rewards/RewardInfo.tsx +++ b/src/components/creators/rewards/RewardInfo.tsx @@ -41,11 +41,17 @@ export default function RewardInfo({ size, ...props }: RewardInfoProps) { ) } + const hasCreatorReward = (data?.receivedLikes ?? 0) > 0 + return (
-
- + {hasCreatorReward && ( + <> +
+ + + )}