fix: hide pro label when user becomes pro member

This commit is contained in:
thecodrr
2020-08-25 09:50:21 +05:00
parent c44c5ea2d0
commit c73ad7a82d

View File

@@ -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);
}
}}
flexDirection="row"
alignItems="center"
@@ -72,7 +65,7 @@ function Menu(props) {
{item.title}
</Text>
)}
{item.onlyPro && !isPremium && (
{item.onlyPro && isTrial === undefined && (
<Text
fontSize="menu"
bg="primary"