diff --git a/README.md b/README.md index 8e41478..9fce9bb 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ -# Nothing interesting here -Early alpha of Kana Quiz remade with React.js and Auth0 +# Kana Quiz 2 +Kana Quiz remade with React.js. +See live at http://simplemedia.org/kana/ diff --git a/package.json b/package.json index 51d3d45..93dee9f 100644 --- a/package.json +++ b/package.json @@ -37,10 +37,9 @@ "webpack-dev-server": "^1.14.1" }, "dependencies": { - "auth0-lock": "^10.0.0", - "jwt-decode": "^2.1.0", "postcss": "^5.1.0", "react": "^15.2.1", + "react-addons-css-transition-group": "^15.3.0", "react-dom": "^15.2.1", "react-toggle-switch": "^2.1.2" } diff --git a/src/components/App/App.jsx b/src/components/App/App.jsx index ac8f7ab..e6bb4e1 100644 --- a/src/components/App/App.jsx +++ b/src/components/App/App.jsx @@ -1,38 +1,21 @@ import React, { Component } from 'react'; -import AuthService from '../../utils/AuthService' import './App.scss'; import Navbar from '../Navbar/Navbar'; import GameContainer from '../GameContainer/GameContainer'; import { removeHash } from '../../data/helperFuncs'; const options = {}; -const auth = new AuthService(__AUTH0_CLIENT_ID__, __AUTH0_DOMAIN__, options); class App extends Component { constructor(props) { super(props); this.state = { - isAuthenticated: this.isAuthenticated(), gameState: 'chooseCharacters' } - auth.on('profile_updated', (newProfile) => { - this.setState({isAuthenticated: this.isAuthenticated()}); - }) - this.logout = this.logout.bind(this); - this.getNickName = this.getNickName.bind(this); this.startGame = this.startGame.bind(this); this.endGame = this.endGame.bind(this); } - isAuthenticated() { - removeHash(); - return auth.loggedIn() && auth.getProfile() && auth.getProfile().hasOwnProperty('user_id'); - } - - getNickName() { - return auth.loggedIn() && auth.getProfile() && auth.getProfile().hasOwnProperty('nickname')?auth.getProfile().nickname:''; - } - startGame() { this.setState({gameState: 'game'}); } @@ -41,34 +24,22 @@ class App extends Component { this.setState({gameState: 'chooseCharacters'}); } - logout() { - auth.logout(); - this.setState({isAuthenticated: this.isAuthenticated()}); - } - render() { - let loginButton = !this.state.isAuthenticated ? -
: ''; return (Please choose the groups of characters that you'd like to be studying.