From c73ad7a82df596ad0481b07889a70c51272eda63 Mon Sep 17 00:00:00 2001 From: thecodrr Date: Tue, 25 Aug 2020 09:50:21 +0500 Subject: [PATCH] fix: hide pro label when user becomes pro member --- apps/web/src/components/menu/index.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/apps/web/src/components/menu/index.js b/apps/web/src/components/menu/index.js index 4c6aa61ad..23994baef 100644 --- a/apps/web/src/components/menu/index.js +++ b/apps/web/src/components/menu/index.js @@ -3,7 +3,6 @@ import { Flex, Box, Text } from "rebass"; import { useStore as useUserStore } from "../../stores/user-store"; function Menu(props) { - const isPremium = useUserStore((store) => store.user.isPremium); const isTrial = useUserStore( (store) => store.user?.notesnook?.subscription?.isTrial ); @@ -44,13 +43,7 @@ function Menu(props) { if (props.closeMenu) { props.closeMenu(); } - - const onlyPro = item.onlyPro && isTrial === undefined; - if (onlyPro) { - // TODO - } else if (item.onClick) { - item.onClick(props.data); - } + item.onClick(props.data); }} flexDirection="row" alignItems="center" @@ -72,7 +65,7 @@ function Menu(props) { {item.title} )} - {item.onlyPro && !isPremium && ( + {item.onlyPro && isTrial === undefined && (