aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/auth/AuthLayout.js
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2018-12-09 01:01:12 +0100
committerLibravatar Stefan Malzner <stefan@adlk.io>2018-12-09 01:01:12 +0100
commitf01957203f77fce8b65d5e034a8acd68f1e0ae2e (patch)
tree2f8d0d232266cdc7ed74e1913b270527f46bb33d /src/components/auth/AuthLayout.js
parentAdd dark mode styles to content tabs (diff)
downloadferdium-app-f01957203f77fce8b65d5e034a8acd68f1e0ae2e.tar.gz
ferdium-app-f01957203f77fce8b65d5e034a8acd68f1e0ae2e.tar.zst
ferdium-app-f01957203f77fce8b65d5e034a8acd68f1e0ae2e.zip
Upgrade to react 16
TODO: add componentDidCatch
Diffstat (limited to 'src/components/auth/AuthLayout.js')
-rw-r--r--src/components/auth/AuthLayout.js21
1 files changed, 4 insertions, 17 deletions
diff --git a/src/components/auth/AuthLayout.js b/src/components/auth/AuthLayout.js
index 4fb0e6a59..4e1b0c52e 100644
--- a/src/components/auth/AuthLayout.js
+++ b/src/components/auth/AuthLayout.js
@@ -1,7 +1,6 @@
1import React, { Component } from 'react'; 1import React, { Component } from 'react';
2import PropTypes from 'prop-types'; 2import PropTypes from 'prop-types';
3import { observer } from 'mobx-react'; 3import { observer } from 'mobx-react';
4import { RouteTransition } from 'react-router-transition';
5import { intlShape } from 'react-intl'; 4import { intlShape } from 'react-intl';
6import { TitleBar } from 'electron-react-titlebar'; 5import { TitleBar } from 'electron-react-titlebar';
7 6
@@ -69,22 +68,10 @@ export default @observer class AuthLayout extends Component {
69 </InfoBar> 68 </InfoBar>
70 )} 69 )}
71 <div className="auth__layout"> 70 <div className="auth__layout">
72 <RouteTransition 71 {/* Inject globalError into children */}
73 pathname={pathname} 72 {React.cloneElement(children, {
74 atEnter={{ opacity: 0 }} 73 error,
75 atLeave={{ opacity: 0 }} 74 })}
76 atActive={{ opacity: 1 }}
77 mapStyles={styles => ({
78 transform: `translateX(${styles.translateX}%)`,
79 opacity: styles.opacity,
80 })}
81 component="span"
82 >
83 {/* Inject globalError into children */}
84 {React.cloneElement(children, {
85 error,
86 })}
87 </RouteTransition>
88 </div> 75 </div>
89 {/* </div> */} 76 {/* </div> */}
90 <Link to="https://adlk.io" className="auth__adlk" target="_blank"> 77 <Link to="https://adlk.io" className="auth__adlk" target="_blank">