Skip to content

Commit 7e23e94

Browse files
authored
fix(billing-ui): open settings when enterprise sub folks press usage indicator (#1194)
1 parent 7fcbafa commit 7e23e94

File tree

1 file changed

+5
-2
lines changed
  • apps/sim/app/workspace/[workspaceId]/w/components/sidebar

1 file changed

+5
-2
lines changed

apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,8 +1007,11 @@ export function Sidebar() {
10071007
>
10081008
<UsageIndicator
10091009
onClick={() => {
1010-
const isBlocked = useSubscriptionStore.getState().getBillingStatus() === 'blocked'
1011-
if (isBlocked) {
1010+
const subscriptionStore = useSubscriptionStore.getState()
1011+
const isBlocked = subscriptionStore.getBillingStatus() === 'blocked'
1012+
const canUpgrade = subscriptionStore.canUpgrade()
1013+
1014+
if (isBlocked || !canUpgrade) {
10121015
if (typeof window !== 'undefined') {
10131016
window.dispatchEvent(
10141017
new CustomEvent('open-settings', { detail: { tab: 'subscription' } })

0 commit comments

Comments
 (0)