|
|
|
@ -303,10 +303,6 @@ export default memo(({ source, type, tab, search, display, limit, className, com
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
console.log('currentTab', currentTab);
|
|
|
|
|
console.log('type', type);
|
|
|
|
|
console.log(source);
|
|
|
|
|
console.log(currentSource);
|
|
|
|
|
/**
|
|
|
|
|
* There is an issue where it doesn't update currentSource when switching from one
|
|
|
|
|
* page to another (Plugins to Themes and Themes to Plugins), but it does properly
|
|
|
|
@ -316,15 +312,17 @@ export default memo(({ source, type, tab, search, display, limit, className, com
|
|
|
|
|
if (prevSource && source !== prevSource) {
|
|
|
|
|
setCurrentSource(source);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Add listeners for addons being installed and uninstalled.
|
|
|
|
|
*/
|
|
|
|
|
vizality.manager[toPlural(type)].on(Events.VIZALITY_ADDON_INSTALL, forceUpdate);
|
|
|
|
|
vizality.manager[toPlural(type)].on(Events.VIZALITY_ADDON_UNINSTALL, forceUpdate);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Remove listeners on dismount.
|
|
|
|
|
*/
|
|
|
|
|
return () => {
|
|
|
|
|
/**
|
|
|
|
|
* Remove listeners on dismount.
|
|
|
|
|
*/
|
|
|
|
|
vizality.manager[toPlural(type)].removeListener(Events.VIZALITY_ADDON_INSTALL, forceUpdate);
|
|
|
|
|
vizality.manager[toPlural(type)].removeListener(Events.VIZALITY_ADDON_UNINSTALL, forceUpdate);
|
|
|
|
|
};
|
|
|
|
|