You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
579 B
16 lines
579 B
import { denormalize } from 'src/utils/normalization'
|
|
import { AppState, EntityType, App, EntityListKey } from 'src/types'
|
|
|
|
export const getApps = (state: AppState) => {
|
|
const entityList = state.lists[EntityListKey.Apps]
|
|
if (!entityList) return []
|
|
|
|
return denormalize(entityList.entities, EntityType.App, state.entities) as App[]
|
|
}
|
|
|
|
export const getCreatedApps = (state: AppState) => {
|
|
const entityList = state.lists[EntityListKey.CreatedApps]
|
|
if (!entityList) return []
|
|
|
|
return denormalize(entityList.entities, EntityType.App, state.entities) as App[]
|
|
}
|