- {this.props.children}
+ const { classes, theme } = this.props;
+ const { pathname } = this.props.location;
+
+ const drawer = (
+
+
+
+
+
+
+
+
+
+
+ );
+
+ return (
+
+
+
+
+
+
+
+
+ Synapse admin
+
+
+
+
+
+
+ {this.props.children}
+
);
}
}
+
+export default withStyles(styles, { withTheme: true })(Layout);
diff --git a/src/features/common/Layout.scss b/src/features/common/Layout.scss
index d05d76c..30cd3ac 100644
--- a/src/features/common/Layout.scss
+++ b/src/features/common/Layout.scss
@@ -1,5 +1,6 @@
@import '../../styles/mixins';
-.common-layout {
- padding-left: 260px;
+.drawer-logo {
+ margin: 10%;
+ width: 80%;
}
diff --git a/src/features/common/SidePanel.js b/src/features/common/SidePanel.js
deleted file mode 100644
index 690f599..0000000
--- a/src/features/common/SidePanel.js
+++ /dev/null
@@ -1,51 +0,0 @@
-import React, { Component } from 'react';
-import PropTypes from 'prop-types';
-import { bindActionCreators } from 'redux';
-import { connect } from 'react-redux';
-import { NavLink } from 'react-router-dom';
-import matrixLogo from '../../images/matrix-logo.svg';
-import * as actions from './redux/actions';
-
-export class SidePanel extends Component {
- static propTypes = {
- common: PropTypes.object.isRequired,
- actions: PropTypes.object.isRequired,
- };
-
- render() {
- return (
-
-
-

-
-
- -
- Users
-
- -
- Rooms
-
-
-
- );
- }
-}
-
-/* istanbul ignore next */
-function mapStateToProps(state) {
- return {
- common: state.common,
- };
-}
-
-/* istanbul ignore next */
-function mapDispatchToProps(dispatch) {
- return {
- actions: bindActionCreators({ ...actions }, dispatch),
- };
-}
-
-export default connect(
- mapStateToProps,
- mapDispatchToProps,
-)(SidePanel);
diff --git a/src/features/common/SidePanel.scss b/src/features/common/SidePanel.scss
deleted file mode 100644
index 1275b08..0000000
--- a/src/features/common/SidePanel.scss
+++ /dev/null
@@ -1,37 +0,0 @@
-@import '../../styles/mixins';
-
-.common-side-panel {
- position: fixed;
- box-sizing: border-box;
- overflow: auto;
- top: 0;
- left: 0;
- margin: 0;
- width: 260px;
- height: 100%;
- background-color: #EEE;
-
- .app-logo {
- margin: 30px;
- width: 200px;
- }
-
- ul,
- li {
- padding: 0;
- margin: 0;
- list-style: none;
- }
-
- a {
- display: block;
- padding: 8px;
- padding-left: 24px;
- text-decoration: none;
- color: black;
- }
- a.active {
- font-weight: bold;
- background-color: #CCC;
- }
-}
diff --git a/src/features/common/index.js b/src/features/common/index.js
index d40f615..efe69c5 100644
--- a/src/features/common/index.js
+++ b/src/features/common/index.js
@@ -1,3 +1,2 @@
export { default as PageNotFound } from './PageNotFound';
-export { default as SidePanel } from './SidePanel';
export { default as Layout } from './Layout';
diff --git a/src/features/common/style.scss b/src/features/common/style.scss
index c8e14dd..187be84 100644
--- a/src/features/common/style.scss
+++ b/src/features/common/style.scss
@@ -1,3 +1,2 @@
@import '../../styles/mixins';
-@import './SidePanel';
@import './Layout';
diff --git a/src/styles/mixins.scss b/src/styles/mixins.scss
index e69de29..98b6148 100644
--- a/src/styles/mixins.scss
+++ b/src/styles/mixins.scss
@@ -0,0 +1,40 @@
+// Small tablets and large smartphones (landscape view)
+$screen-sm-min: 576px;
+
+// Small tablets (portrait view)
+$screen-md-min: 768px;
+
+// Tablets and small desktops
+$screen-lg-min: 992px;
+
+// Large tablets and desktops
+$screen-xl-min: 1200px;
+
+
+// Small devices
+@mixin sm {
+ @media (min-width: #{$screen-sm-min}) {
+ @content;
+ }
+}
+
+// Medium devices
+@mixin md {
+ @media (min-width: #{$screen-md-min}) {
+ @content;
+ }
+}
+
+// Large devices
+@mixin lg {
+ @media (min-width: #{$screen-lg-min}) {
+ @content;
+ }
+}
+
+// Extra large devices
+@mixin xl {
+ @media (min-width: #{$screen-xl-min}) {
+ @content;
+ }
+}
diff --git a/tests/features/common/SidePanel.test.js b/tests/features/common/SidePanel.test.js
deleted file mode 100644
index 39722f3..0000000
--- a/tests/features/common/SidePanel.test.js
+++ /dev/null
@@ -1,19 +0,0 @@
-import React from 'react';
-import { shallow } from 'enzyme';
-import { SidePanel } from '../../../src/features/common/SidePanel';
-
-describe('common/SidePanel', () => {
- it('renders node with correct class name', () => {
- const props = {
- common: {},
- actions: {},
- };
- const renderedComponent = shallow(
-
- );
-
- expect(
- renderedComponent.find('.common-side-panel').length
- ).toBe(1);
- });
-});