From c7e1440a4c04b4faec7a367fb6ba25706fdf8b45 Mon Sep 17 00:00:00 2001 From: "Kalle (Sendou)" <38327916+Sendouc@users.noreply.github.com> Date: Thu, 15 Apr 2021 16:31:24 +0300 Subject: [PATCH] hide suggestion text in UI if not member --- app/plus/components/PlusHomePage.tsx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/app/plus/components/PlusHomePage.tsx b/app/plus/components/PlusHomePage.tsx index 340588897..55c5ea0da 100644 --- a/app/plus/components/PlusHomePage.tsx +++ b/app/plus/components/PlusHomePage.tsx @@ -1,11 +1,11 @@ -import { Box, Center, Divider, Flex, Stack } from "@chakra-ui/layout"; +import { Box, Center, Divider, Flex, Heading, Stack } from "@chakra-ui/layout"; import { Alert, AlertDescription, AlertTitle, Progress, Radio, - RadioGroup, + RadioGroup } from "@chakra-ui/react"; import { Trans } from "@lingui/macro"; import { usePlusHomePage } from "app/plus/hooks/usePlusHomePage"; @@ -32,6 +32,18 @@ const PlusHomePage = () => { votingProgress, } = usePlusHomePage(); + if (!plusStatusData?.membershipTier) { + return + + + + Suggested players this month: + + {suggestionsData.sort((a,b) => a.createdAt.getTime() - b.createdAt.getTime()).map(suggestion => {getFullUsername(suggestion.suggestedUser)} (+{suggestion.tier}))} + + + } + return ( <>