mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2025-05-08 20:50:14 +03:00
Renamed sidebar actions as they make more sense
This commit is contained in:
parent
73d4707420
commit
c949359d6f
4 changed files with 17 additions and 17 deletions
src/common
|
@ -12,8 +12,8 @@ import { AsideMenuProps } from './AsideMenu';
|
|||
import './MenuLayout.scss';
|
||||
|
||||
interface MenuLayoutProps {
|
||||
sidebarRendered: Function;
|
||||
sidebarNotRendered: Function;
|
||||
sidebarPresent: Function;
|
||||
sidebarNotPresent: Function;
|
||||
}
|
||||
|
||||
const MenuLayout = (
|
||||
|
@ -29,16 +29,16 @@ const MenuLayout = (
|
|||
Overview: FC,
|
||||
EditShortUrl: FC,
|
||||
ManageDomains: FC,
|
||||
) => withSelectedServer<MenuLayoutProps>(({ selectedServer, sidebarNotRendered, sidebarRendered }) => {
|
||||
) => withSelectedServer<MenuLayoutProps>(({ selectedServer, sidebarNotPresent, sidebarPresent }) => {
|
||||
const location = useLocation();
|
||||
const [ sidebarVisible, toggleSidebar, showSidebar, hideSidebar ] = useToggle();
|
||||
const showContent = isReachableServer(selectedServer);
|
||||
|
||||
useEffect(() => hideSidebar(), [ location ]);
|
||||
useEffect(() => {
|
||||
showContent && sidebarRendered();
|
||||
showContent && sidebarPresent();
|
||||
|
||||
return () => sidebarNotRendered();
|
||||
return () => sidebarNotPresent();
|
||||
}, []);
|
||||
|
||||
if (!showContent) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue