Skip to content

Commit 592f476

Browse files
committed
open settings modal
1 parent eed91bc commit 592f476

File tree

1 file changed

+1
-5
lines changed
  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-message/components

1 file changed

+1
-5
lines changed

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-message/components/usage-limit-actions.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import { useState } from 'react'
44
import { ArrowRight, Loader2 } from 'lucide-react'
5-
import { useParams, useRouter } from 'next/navigation'
65
import { Button } from '@/components/emcn'
76
import { canEditUsageLimit } from '@/lib/billing/subscriptions/utils'
87
import { useSubscriptionData, useUpdateUsageLimit } from '@/hooks/queries/subscription'
@@ -14,9 +13,6 @@ import { useCopilotStore } from '@/stores/panel/copilot/store'
1413
* After updating limit, retries the original user query
1514
*/
1615
export function UsageLimitActions() {
17-
const router = useRouter()
18-
const params = useParams()
19-
const workspaceId = params?.workspaceId as string
2016
const { data: subscriptionData } = useSubscriptionData()
2117
const updateUsageLimitMutation = useUpdateUsageLimit()
2218

@@ -70,7 +66,7 @@ export function UsageLimitActions() {
7066
}
7167

7268
const handleNavigateToUpgrade = () => {
73-
router.push(`/workspace/${workspaceId}/settings?tab=subscription`)
69+
window.dispatchEvent(new CustomEvent('open-settings', { detail: { tab: 'subscription' } }))
7470
}
7571

7672
// Hide if already processed

0 commit comments

Comments
 (0)