mirror of
https://github.com/simstudioai/sim.git
synced 2026-04-06 03:00:16 -04:00
fix(billing-ui): open settings when enterprise sub folks press usage indicator (#1194)
This commit is contained in:
@@ -1007,8 +1007,11 @@ export function Sidebar() {
|
||||
>
|
||||
<UsageIndicator
|
||||
onClick={() => {
|
||||
const isBlocked = useSubscriptionStore.getState().getBillingStatus() === 'blocked'
|
||||
if (isBlocked) {
|
||||
const subscriptionStore = useSubscriptionStore.getState()
|
||||
const isBlocked = subscriptionStore.getBillingStatus() === 'blocked'
|
||||
const canUpgrade = subscriptionStore.canUpgrade()
|
||||
|
||||
if (isBlocked || !canUpgrade) {
|
||||
if (typeof window !== 'undefined') {
|
||||
window.dispatchEvent(
|
||||
new CustomEvent('open-settings', { detail: { tab: 'subscription' } })
|
||||
|
||||
Reference in New Issue
Block a user