From f84a1dab0bf93f97e497a8ef66beb71b03aa3d89 Mon Sep 17 00:00:00 2001 From: soupette Date: Fri, 5 Mar 2021 11:19:32 +0100 Subject: [PATCH] Fix cetb Signed-off-by: soupette --- .../src/containers/DataManagerProvider/index.js | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/packages/strapi-plugin-content-type-builder/admin/src/containers/DataManagerProvider/index.js b/packages/strapi-plugin-content-type-builder/admin/src/containers/DataManagerProvider/index.js index 861242c2b0..41f8cca634 100644 --- a/packages/strapi-plugin-content-type-builder/admin/src/containers/DataManagerProvider/index.js +++ b/packages/strapi-plugin-content-type-builder/admin/src/containers/DataManagerProvider/index.js @@ -68,7 +68,7 @@ const DataManagerProvider = ({ } = useStrapi(); const { apis } = getPlugin(pluginId); const [infoModals, toggleInfoModal] = useState({ cancel: false }); - const { autoReload, currentEnvironment, emitEvent, formatMessage, menu } = useGlobalContext(); + const { autoReload, currentEnvironment, emitEvent, formatMessage } = useGlobalContext(); const { fetchUserPermissions } = useUser(); const { pathname } = useLocation(); @@ -304,8 +304,6 @@ const DataManagerProvider = ({ // Refetch the permissions await updatePermissions(); - // Update the app menu - await updateAppMenu(); // Refetch all the data getDataRef.current(); } @@ -474,9 +472,6 @@ const DataManagerProvider = ({ await updatePermissions(); - // Update the app menu - await updateAppMenu(); - // Submit ct tracking success if (isInContentTypeView) { emitEvent('didSaveContentType'); @@ -515,13 +510,6 @@ const DataManagerProvider = ({ toggleInfoModal(prev => ({ ...prev, cancel: !prev.cancel })); }; - // Update the menu using the internal API - const updateAppMenu = async () => { - if (menu.getModels) { - await menu.getModels(); - } - }; - const updatePermissions = async () => { await fetchUserPermissions(); };