[REF] web,*: regroup custom hooks in core/utils/hooks
*base_automation,iap,im_livechat,point_of_sale This commit introduces a new file in core/utils: hooks.js This file contains custom hooks (useEffect, useService, useBus...). The useHotkey hook is tightly related to hotkeys, so it has been moved to core/hotkeys. closes odoo/odoo#74535 Related: odoo/enterprise#20003 Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import { browser } from "@web/core/browser/browser";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { useService } from "@web/core/service_hook";
|
||||
import { useService } from "@web/core/utils/hooks";
|
||||
import testUtils from "web.test_utils";
|
||||
import { click, legacyExtraNextTick, nextTick, patchWithCleanup } from "../../helpers/utils";
|
||||
import { createWebClient, doAction, getActionManagerServerData } from "./../helpers";
|
||||
|
||||
@@ -4,16 +4,11 @@ import testUtils from "web.test_utils";
|
||||
import core from "web.core";
|
||||
import AbstractAction from "web.AbstractAction";
|
||||
import { registry } from "@web/core/registry";
|
||||
import {
|
||||
click,
|
||||
legacyExtraNextTick,
|
||||
patchWithCleanup,
|
||||
makeDeferred,
|
||||
} from "../../helpers/utils";
|
||||
import { click, legacyExtraNextTick, patchWithCleanup, makeDeferred } from "../../helpers/utils";
|
||||
import { createWebClient, doAction, getActionManagerServerData } from "./../helpers";
|
||||
import { registerCleanup } from "../../helpers/cleanup";
|
||||
import { errorService } from "@web/core/errors/error_service";
|
||||
import { useService } from "@web/core/service_hook";
|
||||
import { useService } from "@web/core/utils/hooks";
|
||||
import { ClientErrorDialog } from "@web/core/errors/error_dialogs";
|
||||
|
||||
let serverData;
|
||||
|
||||
Reference in New Issue
Block a user