summaryrefslogtreecommitdiff
path: root/public/bundle.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/bundle.js')
-rw-r--r--public/bundle.js27
1 files changed, 12 insertions, 15 deletions
diff --git a/public/bundle.js b/public/bundle.js
index 27e5427..8f06959 100644
--- a/public/bundle.js
+++ b/public/bundle.js
@@ -2110,7 +2110,8 @@ var AuthRouter = function (_Component) {
_createClass(AuthRouter, [{
key: 'render',
value: function render() {
- console.log(this.props, _login2.default);
+ var _this2 = this;
+
return (0, _preact.h)(
_reactRouterDom.BrowserRouter,
null,
@@ -2121,9 +2122,14 @@ var AuthRouter = function (_Component) {
(0, _preact.h)(
_reactRouterDom.Switch,
null,
- (0, _preact.h)(_reactRouterDom.Route, { path: '/logout', component: _logout2.default }),
- (0, _preact.h)(_reactRouterDom.Route, { path: '/signup', component: _signup2.default }),
- (0, _preact.h)(_reactRouterDom.Route, { component: _login2.default })
+ (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/', component: _login2.default }),
+ (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/login', component: _login2.default }),
+ (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/logout', component: _logout2.default }),
+ (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/signup', component: _signup2.default }),
+ (0, _preact.h)(_reactRouterDom.Route, { component: function component(props) {
+ _this2.props.actions.setReturnTo(props.location.pathname);
+ return (0, _preact.h)(_reactRouterDom.Redirect, { to: '/login' });
+ } })
)
)
);
@@ -2150,7 +2156,6 @@ var AuthGate = function (_Component2) {
_createClass(AuthGate, [{
key: 'render',
value: function render() {
- console.log(this.props.auth);
if (!this.props.auth.initialized) {
return (0, _preact.h)(
'div',
@@ -2163,7 +2168,7 @@ var AuthGate = function (_Component2) {
null,
this.props.children
);
- return (0, _preact.h)(AuthRouter, null);
+ return (0, _preact.h)(AuthRouter, this.props);
}
}, {
key: 'componentDidMount',
@@ -2189,14 +2194,6 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) {
exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(AuthGate);
-// <Route component={props => {
-// console.log(window.location.pathname)
-// this.props.actions.setReturnTo(window.location.pathname)
-// return (
-// <Redirect to="/login" />
-// )
-// }} />
-
/***/ }),
/***/ "./app/client/auth/auth.reducer.js":
@@ -7332,12 +7329,12 @@ var app = (0, _preact.h)(
(0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/dashboard/', component: _dashboard2.default }),
(0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/logout/', component: _auth2.default.Logout }),
module_list,
- (0, _preact.h)(_common.Header, null),
(0, _preact.h)(_reactRouterDom.Route, { component: function component() {
return (0, _preact.h)(_reactRouterDom.Redirect, { to: '/' });
} })
)
),
+ (0, _preact.h)(_common.Header, null),
(0, _preact.h)(_common.AudioPlayer, null)
)
);