From 2b02456c23ecec6039278cbdc5362a9551b9a58a Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 21 Jun 2018 21:53:47 +0300 Subject: Facebook login --- vnext/src/components/LoginButton.js | 3 +-- vnext/src/index.js | 9 ++++++++- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'vnext/src') diff --git a/vnext/src/components/LoginButton.js b/vnext/src/components/LoginButton.js index 6f698e16..558f61f4 100644 --- a/vnext/src/components/LoginButton.js +++ b/vnext/src/components/LoginButton.js @@ -3,7 +3,6 @@ import PropTypes from 'prop-types'; import Icon from './Icon'; import Modal from './Modal'; - export default class LoginButton extends React.Component { constructor(props) { super(props); @@ -58,7 +57,7 @@ export default class LoginButton extends React.Component { onClose={this.toggleModal}>

Please, introduce yourself:

- Login with facebook + Login with facebook Login with VK

Already registered?

diff --git a/vnext/src/index.js b/vnext/src/index.js index 7ba41fc1..848a689e 100644 --- a/vnext/src/index.js +++ b/vnext/src/index.js @@ -1,6 +1,8 @@ import React from 'react'; import ReactDOM from 'react-dom'; -import { BrowserRouter as Router, Route, Link, Switch } from 'react-router-dom'; +import { BrowserRouter as Router, Route, Link, Switch, Redirect } from 'react-router-dom'; +import * as qs from 'query-string'; + import Icon from './components/Icon'; import { Discover, Discussions, Blog, Tag, Home } from './components/Feeds'; import Settings from './components/Settings'; @@ -136,6 +138,11 @@ class App extends React.Component { } /> + { + let params = qs.parse(props.location.search) + this.auth(params.hash) + return + }} /> } /> } /> } /> -- cgit v1.2.3