Skip to content

Commit 3383495

Browse files
committed
fix(settings): align recently-deleted icon colors with platform token
1 parent 7714663 commit 3383495

1 file changed

Lines changed: 5 additions & 17 deletions

File tree

apps/sim/app/workspace/[workspaceId]/settings/components/recently-deleted/recently-deleted.tsx

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { useMemo, useState } from 'react'
44
import { Chip, ChipInput, ChipModalTabs } from '@sim/emcn'
5-
import { Folder, Search, Workflow } from '@sim/emcn/icons'
5+
import { Search } from '@sim/emcn/icons'
66
import { toError } from '@sim/utils/errors'
77
import { formatDate } from '@sim/utils/formatting'
88
import { useParams, useRouter } from 'next/navigation'
@@ -72,12 +72,12 @@ const SORT_OPTIONS: ColumnOption[] = [
7272
{ id: 'type', label: 'Type' },
7373
]
7474

75-
const ICON_CLASS = 'size-5'
75+
const ICON_CLASS = 'size-5 shrink-0'
7676

77-
const RESOURCE_TYPE_TO_MOTHERSHIP: Partial<
78-
Record<Exclude<ResourceType, 'all'>, MothershipResourceType>
79-
> = {
77+
const RESOURCE_TYPE_TO_MOTHERSHIP: Record<Exclude<ResourceType, 'all'>, MothershipResourceType> = {
8078
workflow: 'workflow',
79+
folder: 'folder',
80+
workspace_folder: 'filefolder',
8181
table: 'table',
8282
knowledge: 'knowledgebase',
8383
file: 'file',
@@ -89,7 +89,6 @@ interface DeletedResource {
8989
type: Exclude<ResourceType, 'all'>
9090
deletedAt: Date
9191
workspaceId: string
92-
color?: string
9392
}
9493

9594
interface RestoredResourceEntry {
@@ -116,17 +115,7 @@ const TYPE_LABEL: Record<Exclude<ResourceType, 'all'>, string> = {
116115
}
117116

118117
function ResourceIcon({ resource }: { resource: DeletedResource }) {
119-
if (resource.type === 'workflow') {
120-
return <Workflow className={`${ICON_CLASS} shrink-0 text-[var(--text-icon)]`} />
121-
}
122-
123-
if (resource.type === 'folder' || resource.type === 'workspace_folder') {
124-
const color = resource.color ?? '#6B7280'
125-
return <Folder className={ICON_CLASS} style={{ color }} />
126-
}
127-
128118
const mothershipType = RESOURCE_TYPE_TO_MOTHERSHIP[resource.type]
129-
if (!mothershipType) return null
130119
const config = RESOURCE_REGISTRY[mothershipType]
131120
return config.renderTabIcon(
132121
{ type: mothershipType, id: resource.id, title: resource.name },
@@ -222,7 +211,6 @@ export function RecentlyDeleted() {
222211
type: 'folder',
223212
deletedAt: folder.archivedAt ? new Date(folder.archivedAt) : new Date(folder.updatedAt),
224213
workspaceId: folder.workspaceId,
225-
color: folder.color,
226214
})
227215
}
228216

0 commit comments

Comments
 (0)