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(); };