🔀 merge
This commit is contained in:
commit
5b12572f84
5 changed files with 12 additions and 9 deletions
|
@ -6,7 +6,7 @@ import Button from '../../common/Button';
|
||||||
import IconButton from './IconButton';
|
import IconButton from './IconButton';
|
||||||
|
|
||||||
const FloatingContainer = styled.div`
|
const FloatingContainer = styled.div`
|
||||||
position: absolute;
|
position: fixed;
|
||||||
right: ${remSize(16)};
|
right: ${remSize(16)};
|
||||||
top: ${remSize(80)};
|
top: ${remSize(80)};
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ const SidebarWrapper = styled.div`
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: ${remSize(180)};
|
width: ${remSize(180)};
|
||||||
|
|
||||||
position: absolute;
|
position: fixed;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ import styled from 'styled-components';
|
||||||
import { useModalBehavior } from '../utils/custom-hooks';
|
import { useModalBehavior } from '../utils/custom-hooks';
|
||||||
|
|
||||||
const BackgroundOverlay = styled.div`
|
const BackgroundOverlay = styled.div`
|
||||||
position: absolute;
|
position: fixed;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
height: 100% !important;
|
height: 100% !important;
|
||||||
|
|
|
@ -18,7 +18,9 @@ class App extends React.Component {
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {
|
componentWillReceiveProps(nextProps) {
|
||||||
const locationWillChange = nextProps.location !== this.props.location;
|
const locationWillChange = nextProps.location !== this.props.location;
|
||||||
const shouldSkipRemembering = nextProps.location.state && nextProps.location.state.skipSavingPath === true;
|
const shouldSkipRemembering =
|
||||||
|
nextProps.location.state &&
|
||||||
|
nextProps.location.state.skipSavingPath === true;
|
||||||
|
|
||||||
if (locationWillChange && !shouldSkipRemembering) {
|
if (locationWillChange && !shouldSkipRemembering) {
|
||||||
this.props.setPreviousPath(this.props.location.pathname);
|
this.props.setPreviousPath(this.props.location.pathname);
|
||||||
|
@ -34,9 +36,10 @@ class App extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="app">
|
<div className="app">
|
||||||
<div style={{ display: 'none' }}>
|
{false &&
|
||||||
{this.state.isMounted && !window.devToolsExtension && getConfig('NODE_ENV') === 'development' && <DevTools />}
|
this.state.isMounted &&
|
||||||
</div>
|
!window.devToolsExtension &&
|
||||||
|
getConfig('NODE_ENV') === 'development' && <DevTools />}
|
||||||
{this.props.children}
|
{this.props.children}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -57,7 +60,7 @@ App.propTypes = {
|
||||||
|
|
||||||
App.defaultProps = {
|
App.defaultProps = {
|
||||||
children: null,
|
children: null,
|
||||||
theme: 'light'
|
theme: 'light',
|
||||||
};
|
};
|
||||||
|
|
||||||
const mapStateToProps = state => ({
|
const mapStateToProps = state => ({
|
||||||
|
|
|
@ -28,7 +28,7 @@ export const useModalBehavior = (hideOverlay) => {
|
||||||
|
|
||||||
|
|
||||||
const handleClickOutside = ({ target }) => {
|
const handleClickOutside = ({ target }) => {
|
||||||
if (ref && ref.current && !ref.current.contains(target)) {
|
if (ref && ref.current && !(ref.current.contains && ref.current.contains(target))) {
|
||||||
hide();
|
hide();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue