diff --git a/imports/ui/components/Authenticated/Authenticated.js b/imports/ui/components/Authenticated/Authenticated.js
index 69c2ab5..f34da2f 100644
--- a/imports/ui/components/Authenticated/Authenticated.js
+++ b/imports/ui/components/Authenticated/Authenticated.js
@@ -9,7 +9,7 @@ const Authenticated = ({ loggingIn, authenticated, component, path, exact, ...re
render={props => (
authenticated ?
(React.createElement(component, { ...props, ...rest, loggingIn, authenticated })) :
- ()
+ ()
)}
/>
);
diff --git a/imports/ui/components/AuthenticatedNavigation/AuthenticatedNavigation.js b/imports/ui/components/AuthenticatedNavigation/AuthenticatedNavigation.js
index d8518b8..c8f6b18 100644
--- a/imports/ui/components/AuthenticatedNavigation/AuthenticatedNavigation.js
+++ b/imports/ui/components/AuthenticatedNavigation/AuthenticatedNavigation.js
@@ -1,10 +1,11 @@
import React from 'react';
import PropTypes from 'prop-types';
+import { withRouter } from 'react-router-dom';
import { LinkContainer } from 'react-router-bootstrap';
import { Nav, NavItem, NavDropdown, MenuItem } from 'react-bootstrap';
import { Meteor } from 'meteor/meteor';
-const AuthenticatedNavigation = ({ name }) => (
+const AuthenticatedNavigation = ({ name, history }) => (
@@ -27,4 +28,4 @@ AuthenticatedNavigation.propTypes = {
name: PropTypes.string.isRequired,
};
-export default AuthenticatedNavigation;
+export default withRouter(AuthenticatedNavigation);
diff --git a/imports/ui/layouts/App/App.js b/imports/ui/layouts/App/App.js
index 97a49c5..2be6a1f 100644
--- a/imports/ui/layouts/App/App.js
+++ b/imports/ui/layouts/App/App.js
@@ -56,7 +56,7 @@ const App = props => (
-
+
diff --git a/imports/ui/pages/Login/Login.js b/imports/ui/pages/Login/Login.js
index 29f4fa2..fb7377f 100644
--- a/imports/ui/pages/Login/Login.js
+++ b/imports/ui/pages/Login/Login.js
@@ -48,7 +48,6 @@ class Login extends React.Component {
Bert.alert(error.reason, 'danger');
} else {
Bert.alert('Welcome back!', 'success');
- history.push('/documents');
}
});
}
diff --git a/imports/ui/pages/Logout/Logout.js b/imports/ui/pages/Logout/Logout.js
index 59b3cbe..127c35c 100644
--- a/imports/ui/pages/Logout/Logout.js
+++ b/imports/ui/pages/Logout/Logout.js
@@ -3,21 +3,29 @@ import Icon from '../../components/Icon/Icon';
import './Logout.scss';
-const Logout = () => (
-
-

-
Stay safe out there.
-
{'Don\'t forget to like and follow Clever Beagle elsewhere on the web:'}
-
-
-);
+class Logout extends React.Component {
+ componentDidMount() {
+ Meteor.logout();
+ }
+
+ render() {
+ return (
+
+

+
Stay safe out there.
+
{'Don\'t forget to like and follow Clever Beagle elsewhere on the web:'}
+
+
+ );
+ }
+}
Logout.propTypes = {};