From c766a3aabba6fda6d9e7e13e39f8780226989fe6 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 10 Jul 2019 18:58:52 +0300 Subject: login wip --- vnext/src/App.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'vnext/src/App.js') diff --git a/vnext/src/App.js b/vnext/src/App.js index bad57fc4..ea63ae18 100644 --- a/vnext/src/App.js +++ b/vnext/src/App.js @@ -10,7 +10,7 @@ import Contacts from './ui/Contacts'; import Chat from './ui/Chat'; import Post from './ui/Post'; import Thread from './ui/Thread'; -import LoginButton from './ui/LoginButton'; +import Login from './ui/Login'; import { UserLink } from './ui/UserInfo'; import SearchBox from './ui/SearchBox'; @@ -22,7 +22,8 @@ export default function App() { let params = qs.parse(window.location.search.substring(1)); if (params.hash) { cookie.save('hash', params.hash, { path: '/' }); - window.history.replaceState({}, document.title, `${window.location.protocol}//${window.location.host}${window.location.pathname}`); + let retpath = params.retpath || `${window.location.protocol}//${window.location.host}${window.location.pathname}`; + window.history.replaceState({}, document.title, retpath); } const [visitor, setVisitor] = useState({ uid: 0 @@ -121,7 +122,10 @@ export default function App() { Post : - + + + Login + } @@ -136,6 +140,7 @@ export default function App() { } /> + } /> } /> } /> } /> -- cgit v1.2.3