We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7fcbafa commit 7e23e94Copy full SHA for 7e23e94
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx
@@ -1007,8 +1007,11 @@ export function Sidebar() {
1007
>
1008
<UsageIndicator
1009
onClick={() => {
1010
- const isBlocked = useSubscriptionStore.getState().getBillingStatus() === 'blocked'
1011
- if (isBlocked) {
+ const subscriptionStore = useSubscriptionStore.getState()
+ const isBlocked = subscriptionStore.getBillingStatus() === 'blocked'
1012
+ const canUpgrade = subscriptionStore.canUpgrade()
1013
+
1014
+ if (isBlocked || !canUpgrade) {
1015
if (typeof window !== 'undefined') {
1016
window.dispatchEvent(
1017
new CustomEvent('open-settings', { detail: { tab: 'subscription' } })
0 commit comments