created new getCanDisplay method for InfoPanelStore
This commit is contained in:
parent
7c90353298
commit
fac0f14608
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user