Improve API of parseEntitiesPath

This commit is contained in:
Alex Gleason
2023-03-22 16:12:05 -05:00
parent 8f67d2c76f
commit 61fb434a54
5 changed files with 12 additions and 11 deletions

View File

@@ -35,8 +35,7 @@ function useCreateEntity<TEntity extends Entity = Entity, Params = any, Result =
createFn: CreateFn<Params, Result>,
opts: UseCreateEntityOpts<TEntity> = {},
) {
const path = parseEntitiesPath(expandedPath);
const [entityType, listKey] = path;
const { entityType, listKey } = parseEntitiesPath(expandedPath);
const dispatch = useAppDispatch();