mirror of
https://github.com/strapi/strapi.git
synced 2025-12-04 11:02:12 +00:00
Fix cetb
Signed-off-by: soupette <cyril.lpz@gmail.com>
This commit is contained in:
parent
dfb40c08b6
commit
f84a1dab0b
@ -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();
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user