Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Corepex committed Dec 10, 2024
1 parent 70cee4d commit d4bc869
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions assets/js/src/core/modules/element/hooks/use-element-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,30 +50,6 @@ export const useElementApi = (elementType: ElementType): UseElementApiReturn =>
'filename',
args.body.data[0].key
)

/* eslint-disable */
/*const entries = assetApi.util.selectInvalidatedBy(
store.getState() as any,
['ASSET_TREE']
)
entries.forEach((queryKeys) => {
dispatch(assetApi.util.updateQueryData(
// @ts-ignore typescript, constants, u know? - i dont - @daniel
queryKeys.endpointName,
queryKeys.originalArgs,
(draft) => {
if('items' in draft && typeof draft.items === 'object') {
const entries = draft.items as Array<Asset>
const indexToUpdate = entries.findIndex((entry) => entry.id === args.body.data[0].id)
if(indexToUpdate !== -1) {
draft.items![indexToUpdate].filename = args.body.data[0].key as string
}
}
}
))
})*/
} else if (elementType === 'data-object') {
await dataObjectPatch(args)

Expand Down

0 comments on commit d4bc869

Please sign in to comment.