created new getCanDisplay method for InfoPanelStore

This commit is contained in:
mushka 2022-09-20 14:53:35 +03:00
parent 7c90353298
commit fac0f14608

View File

@ -75,6 +75,18 @@ class InfoPanelStore {
const pathname = window.location.pathname.toLowerCase();
return pathname.indexOf("form-gallery") !== -1;
};
getCanDisplay = () => {
const pathname = window.location.pathname.toLowerCase();
const isRooms = pathname.indexOf("rooms") !== -1;
const isFiles = pathname.indexOf("files") !== -1;
const isGallery = pathname.indexOf("form-gallery") !== -1;
const isAccountsHome =
pathname.indexOf("accounts") !== -1 && !(pathname.indexOf("view") !== -1);
return isRooms || isFiles || isGallery || isAccountsHome;
};
}
export default InfoPanelStore;