Skip to content

Commit 2181ee7

Browse files
waleedlatif1claude
andcommitted
chore(templates): clean up dead code from review feedback
- Remove unused usePathname/pathnameRef in use-workspace-management.ts - Comment out stale 'template' from TabView union type - Remove unused params from TemplateLayoutProps interface Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ca78dbe commit 2181ee7

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

apps/sim/app/templates/[id]/layout.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99

1010
interface TemplateLayoutProps {
1111
children: React.ReactNode
12-
params: Promise<{
13-
id: string
14-
}>
1512
}
1613

1714
/**

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/deploy-modal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ interface WorkflowDeploymentInfoUI {
7373
isPublicApi: boolean
7474
}
7575

76-
type TabView = 'general' | 'api' | 'chat' | 'template' | 'mcp' | 'form' | 'a2a'
76+
type TabView = 'general' | 'api' | 'chat' | /* 'template' | */ 'mcp' | 'form' | 'a2a'
7777

7878
export function DeployModal({
7979
open,

apps/sim/app/workspace/[workspaceId]/w/components/sidebar/hooks/use-workspace-management.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useCallback, useEffect, useMemo, useRef } from 'react'
22
import { createLogger } from '@sim/logger'
33
import { useQueryClient } from '@tanstack/react-query'
4-
import { usePathname, useRouter } from 'next/navigation'
4+
import { useRouter } from 'next/navigation'
55
import { useLeaveWorkspace } from '@/hooks/queries/invitations'
66
import {
77
useCreateWorkspace,
@@ -33,7 +33,6 @@ export function useWorkspaceManagement({
3333
sessionUserId,
3434
}: UseWorkspaceManagementProps) {
3535
const router = useRouter()
36-
const pathname = usePathname()
3736
const queryClient = useQueryClient()
3837
const switchToWorkspace = useWorkflowRegistry((state) => state.switchToWorkspace)
3938

@@ -50,12 +49,10 @@ export function useWorkspaceManagement({
5049

5150
const workspaceIdRef = useRef<string>(workspaceId)
5251
const routerRef = useRef<ReturnType<typeof useRouter>>(router)
53-
const pathnameRef = useRef<string | null>(pathname || null)
5452
const hasValidatedRef = useRef<boolean>(false)
5553

5654
workspaceIdRef.current = workspaceId
5755
routerRef.current = router
58-
pathnameRef.current = pathname || null
5956

6057
const activeWorkspace = useMemo(() => {
6158
if (!workspaces.length) return null

0 commit comments

Comments
 (0)