Skip to content

Commit 011639e

Browse files
committed
refactor: remove unused imports and functions from DataEnhancement utility
1 parent ee57371 commit 011639e

1 file changed

Lines changed: 1 addition & 16 deletions

File tree

src/utils/DataEnhancement.ts

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { RemoteConfig, Tag, TagValuesFieldType } from 'src/features/remoteConfig'
2-
import { BaseEntry } from 'src/types'
1+
import { RemoteConfig, Tag } from 'src/features/remoteConfig'
32

43
export const enhanceTags = (remoteConfigStore: RemoteConfig, tags: string[]): Tag[] => {
54
return tags
@@ -8,17 +7,3 @@ export const enhanceTags = (remoteConfigStore: RemoteConfig, tags: string[]): Ta
87
)
98
.filter(Boolean) as Tag[]
109
}
11-
12-
export const getCardTagsValue = (tags: Tag[], valuesField: TagValuesFieldType): string[] => {
13-
return tags.reduce((acc: string[], curr) => {
14-
if (!curr[valuesField] || curr[valuesField].length === 0) return acc
15-
acc = [...acc, ...curr[valuesField]]
16-
return acc
17-
}, [])
18-
}
19-
20-
export const filterUniqueEntries = (entries: BaseEntry[]) => {
21-
const uniqueResults = new Map()
22-
entries.forEach((item) => uniqueResults.set(item.id, item))
23-
return Array.from(uniqueResults.values())
24-
}

0 commit comments

Comments
 (0)