mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 04:55:44 +00:00
Tweak query return data
This commit is contained in:
@ -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: {
|
||||||
|
Reference in New Issue
Block a user