Commit 027bce59 authored by Denis Sedura's avatar Denis Sedura

[RNA-761] Fix login

parent 82d5bc4a
......@@ -4,7 +4,8 @@ import { Router } from 'tipsi-router'
export default function enhanceLogoutButton(ComposedComponent) {
return class Wrapper extends Component {
handleLogout = () => {
Router.replace(null, Router.routes.home)
Router.popToTop()
setTimeout(() => Router.replace(null, Router.routes.home), 150)
}
render() {
return (
......
......@@ -42,10 +42,12 @@ function enhanceSidebarMenu(ComposedComponent) {
})
} else if (type === 'push') {
// navigatorApp.push(Router.getRoute(route, props))
Router.push(null, Router.routes[route], props)
console.log('Push to ', route)
} else if (type === 'reset') {
// navigatorApp.immediatelyResetStack([Router.getRoute(route, props)])
console.log('Reset stack', route)
Router.popToTop()
} else if (type === 'popToTop') {
Router.popToTop()
Router.push(null, Router.routes[route], { ...props, user })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment