refactor: extract parseClassList to shared utils
This commit is contained in:
@@ -1,15 +1,4 @@
|
||||
export {}
|
||||
|
||||
const parseClassList = (value: string | null): string[] => {
|
||||
if (!value) {
|
||||
return []
|
||||
}
|
||||
|
||||
return value
|
||||
.split(' ')
|
||||
.map((entry: string): string => entry.trim())
|
||||
.filter((entry: string): boolean => entry.length > 0)
|
||||
}
|
||||
import { parseClassList } from './utils'
|
||||
|
||||
const setActiveDiscoverTab = (clickedTab: Element): void => {
|
||||
const group = clickedTab.closest('[data-tab-group="discover"]')
|
||||
|
||||
Reference in New Issue
Block a user