skolplattformen-backup/libs/hooks/src/actions.ts

11 lines
223 B
TypeScript
Raw Normal View History

2021-10-06 20:47:50 +00:00
import { EntityAction, EntityName, ExtraActionProps } from './types'
2021-10-06 20:47:50 +00:00
export const loadAction = <T>(
entity: EntityName,
extra: ExtraActionProps<T>
): EntityAction<T> => ({
entity,
extra,
type: 'GET_FROM_API',
})