diff --git a/src/common/AsideMenu.js b/src/common/AsideMenu.js
index 7850488b..56e7d10c 100644
--- a/src/common/AsideMenu.js
+++ b/src/common/AsideMenu.js
@@ -3,14 +3,21 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import React from 'react';
import { NavLink } from 'react-router-dom';
import PropTypes from 'prop-types';
-import classnames from 'classnames';
+import classNames from 'classnames';
import { serverType } from '../servers/prop-types';
import './AsideMenu.scss';
-const defaultProps = {
- className: '',
- showOnMobile: false,
+const AsideMenuItem = ({ children, to, ...rest }) => (
+
+ {children}
+
+);
+
+AsideMenuItem.propTypes = {
+ children: PropTypes.node.isRequired,
+ to: PropTypes.string.isRequired,
};
+
const propTypes = {
selectedServer: serverType,
className: PropTypes.string,
@@ -20,51 +27,34 @@ const propTypes = {
const AsideMenu = (DeleteServerButton) => {
const AsideMenu = ({ selectedServer, className, showOnMobile }) => {
const serverId = selectedServer ? selectedServer.id : '';
- const asideClass = classnames('aside-menu', className, {
+ const asideClass = classNames('aside-menu', className, {
'aside-menu--hidden': !showOnMobile,
});
const shortUrlsIsActive = (match, location) => location.pathname.match('/list-short-urls');
+ const buildPath = (suffix) => `/server/${serverId}${suffix}`;
return (
);
};
- AsideMenu.defaultProps = defaultProps;
AsideMenu.propTypes = propTypes;
return AsideMenu;