feat: hide upgrade button when on active subscription
This commit is contained in:
@@ -177,31 +177,33 @@ export default function SideNavigation({
|
|||||||
isCollapsed={isCollapsed}
|
isCollapsed={isCollapsed}
|
||||||
onCloseSideNav={onCloseSideNav}
|
onCloseSideNav={onCloseSideNav}
|
||||||
/>
|
/>
|
||||||
{isCloudEnv && !hasActiveSubscription(subscriptions, "pro") && (
|
{isCloudEnv &&
|
||||||
<div className={twMerge(isCollapsed && "flex justify-center")}>
|
!hasActiveSubscription(subscriptions, "pro") &&
|
||||||
{isCollapsed ? (
|
!hasActiveSubscription(subscriptions, "team") && (
|
||||||
<ButtonComponent
|
<div className={twMerge(isCollapsed && "flex justify-center")}>
|
||||||
iconLeft={<HiBolt />}
|
{isCollapsed ? (
|
||||||
variant="secondary"
|
<ButtonComponent
|
||||||
href="/settings/workspace?upgrade=pro"
|
iconLeft={<HiBolt />}
|
||||||
aria-label="Upgrade to Pro"
|
variant="secondary"
|
||||||
title="Upgrade to Pro"
|
href="/settings/workspace?upgrade=pro"
|
||||||
iconOnly
|
aria-label="Upgrade to Pro"
|
||||||
onClick={() => openModal("UPGRADE_TO_PRO")}
|
title="Upgrade to Pro"
|
||||||
/>
|
iconOnly
|
||||||
) : (
|
onClick={() => openModal("UPGRADE_TO_PRO")}
|
||||||
<ButtonComponent
|
/>
|
||||||
iconLeft={<HiBolt />}
|
) : (
|
||||||
fullWidth
|
<ButtonComponent
|
||||||
variant="secondary"
|
iconLeft={<HiBolt />}
|
||||||
href="/settings/workspace?upgrade=pro"
|
fullWidth
|
||||||
onClick={() => openModal("UPGRADE_TO_PRO")}
|
variant="secondary"
|
||||||
>
|
href="/settings/workspace?upgrade=pro"
|
||||||
{t`Upgrade to Pro`}
|
onClick={() => openModal("UPGRADE_TO_PRO")}
|
||||||
</ButtonComponent>
|
>
|
||||||
)}
|
{t`Upgrade to Pro`}
|
||||||
</div>
|
</ButtonComponent>
|
||||||
)}
|
)}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ export default function MembersPage() {
|
|||||||
<div className="flex items-center gap-3">
|
<div className="flex items-center gap-3">
|
||||||
{env("NEXT_PUBLIC_KAN_ENV") === "cloud" && (
|
{env("NEXT_PUBLIC_KAN_ENV") === "cloud" && (
|
||||||
<>
|
<>
|
||||||
{!proSubscription && (
|
{!proSubscription && !teamSubscription && (
|
||||||
<Link
|
<Link
|
||||||
href="/settings/workspace?upgrade=pro"
|
href="/settings/workspace?upgrade=pro"
|
||||||
className="hidden items-center rounded-full border border-emerald-300 bg-emerald-50 px-3 py-1 text-center text-xs text-emerald-400 dark:border-emerald-700 dark:bg-emerald-950 dark:text-emerald-400 lg:flex"
|
className="hidden items-center rounded-full border border-emerald-300 bg-emerald-50 px-3 py-1 text-center text-xs text-emerald-400 dark:border-emerald-700 dark:bg-emerald-950 dark:text-emerald-400 lg:flex"
|
||||||
|
|||||||
@@ -80,7 +80,8 @@ export default function WorkspaceSettings() {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{env("NEXT_PUBLIC_KAN_ENV") === "cloud" &&
|
{env("NEXT_PUBLIC_KAN_ENV") === "cloud" &&
|
||||||
!hasActiveSubscription(subscriptions, "pro") && (
|
!hasActiveSubscription(subscriptions, "pro") &&
|
||||||
|
!hasActiveSubscription(subscriptions, "team") && (
|
||||||
<div className="my-8">
|
<div className="my-8">
|
||||||
<Button
|
<Button
|
||||||
onClick={() => openModal("UPGRADE_TO_PRO")}
|
onClick={() => openModal("UPGRADE_TO_PRO")}
|
||||||
|
|||||||
Reference in New Issue
Block a user