mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Tweak query return data
This commit is contained in:
parent
e094f185b6
commit
cb91e6f860
@ -43,6 +43,10 @@ export function usePluginPanels({
|
|||||||
enabled: pluginPanelsEnabled && !!targetModel,
|
enabled: pluginPanelsEnabled && !!targetModel,
|
||||||
queryKey: [targetModel, targetId],
|
queryKey: [targetModel, targetId],
|
||||||
queryFn: () => {
|
queryFn: () => {
|
||||||
|
if (!pluginPanelsEnabled || !targetModel) {
|
||||||
|
return Promise.resolve([]);
|
||||||
|
}
|
||||||
|
|
||||||
return api
|
return api
|
||||||
.get(apiUrl(ApiEndpoints.plugin_panel_list), {
|
.get(apiUrl(ApiEndpoints.plugin_panel_list), {
|
||||||
params: {
|
params: {
|
||||||
|
Loading…
Reference in New Issue
Block a user