Skip to content

Commit 0b439ec

Browse files
authored
chore(stores): remove unused exports and dead code from zustand stores (#4014)
1 parent d5bea5f commit 0b439ec

File tree

8 files changed

+4
-48
lines changed

8 files changed

+4
-48
lines changed

apps/sim/stores/folders/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
export { useFolderStore, useIsFolderSelected, useIsWorkflowSelected } from './store'
2-
export type { FolderTreeNode, Workflow, WorkflowFolder } from './types'
2+
export type { FolderTreeNode, WorkflowFolder } from './types'

apps/sim/stores/folders/store.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,3 @@ export const useIsWorkflowSelected = (workflowId: string) =>
301301

302302
export const useIsFolderSelected = (folderId: string) =>
303303
useFolderStore((state) => state.selectedFolders.has(folderId))
304-
305-
export const useIsTaskSelected = (taskId: string) =>
306-
useFolderStore((state) => state.selectedTasks.has(taskId))

apps/sim/stores/folders/types.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
export interface Workflow {
2-
id: string
3-
folderId?: string | null
4-
name?: string
5-
description?: string
6-
userId?: string
7-
workspaceId?: string
8-
[key: string]: any // For additional properties
9-
}
10-
111
export interface WorkflowFolder {
122
id: string
133
name: string
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
export { useNotificationStore } from './store'
2-
export type {
3-
AddNotificationParams,
4-
Notification,
5-
NotificationAction,
6-
} from './types'
2+
export type { Notification, NotificationAction } from './types'
73
export { sendMothershipMessage } from './utils'

apps/sim/stores/terminal/console/index.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,4 @@ export {
77
} from './storage'
88
export { useConsoleEntry, useTerminalConsoleStore, useWorkflowConsoleEntries } from './store'
99
export type { ConsoleEntry, ConsoleStore, ConsoleUpdate } from './types'
10-
export {
11-
normalizeConsoleError,
12-
normalizeConsoleInput,
13-
normalizeConsoleOutput,
14-
safeConsoleStringify,
15-
TERMINAL_CONSOLE_LIMITS,
16-
trimConsoleEntries,
17-
trimWorkflowConsoleEntries,
18-
} from './utils'
10+
export { safeConsoleStringify } from './utils'

apps/sim/stores/terminal/index.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,8 @@ export {
44
consolePersistence,
55
type ExecutionPointer,
66
loadExecutionPointer,
7-
normalizeConsoleError,
8-
normalizeConsoleInput,
9-
normalizeConsoleOutput,
107
safeConsoleStringify,
118
saveExecutionPointer,
12-
TERMINAL_CONSOLE_LIMITS,
13-
trimConsoleEntries,
14-
trimWorkflowConsoleEntries,
159
useConsoleEntry,
1610
useTerminalConsoleStore,
1711
useWorkflowConsoleEntries,

apps/sim/stores/variables/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
export {
2-
getDefaultVariablesDimensions,
32
getVariablesPosition,
43
MAX_VARIABLES_HEIGHT,
54
MAX_VARIABLES_WIDTH,

apps/sim/stores/variables/modal.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import { create } from 'zustand'
22
import { devtools, persist } from 'zustand/middleware'
3-
import type {
4-
VariablesDimensions,
5-
VariablesModalStore,
6-
VariablesPosition,
7-
} from '@/stores/variables/types'
3+
import type { VariablesModalStore, VariablesPosition } from '@/stores/variables/types'
84

95
/**
106
* Floating variables modal default dimensions.
@@ -135,11 +131,3 @@ export const useVariablesModalStore = create<VariablesModalStore>()(
135131
{ name: 'variables-modal-store' }
136132
)
137133
)
138-
139-
/**
140-
* Get default floating variables modal dimensions.
141-
*/
142-
export const getDefaultVariablesDimensions = (): VariablesDimensions => ({
143-
width: DEFAULT_WIDTH,
144-
height: DEFAULT_HEIGHT,
145-
})

0 commit comments

Comments
 (0)