code cleaning
This commit is contained in:
1 parent
64101169d4
commit
307b77535d
6 files changed
+1
-35
No files matched your search
@@ -8,8 +8,6 @@ import { client } from '../App'
|
||||
|
||||
import { AUTH_CONFIG } from './Auth0' // create by renaming Auth0.sample.js to Auth0.js and setting vars
|
||||
|
||||
console.log(process.env.AUTH0_CLIENTID)
|
||||
|
||||
const AUTHENTICATE = gql`
|
||||
mutation authenticate($idToken: String!) {
|
||||
authenticate(idToken: $idToken) {
|
||||
|
||||
@@ -11,15 +11,8 @@ class LoggedInUser extends Component {
|
||||
|
||||
const user = this.props.data.userByAuthId;
|
||||
|
||||
console.log('loggedInUser data', this.props.data);
|
||||
console.log('loggedInUser', user);
|
||||
|
||||
if(user){
|
||||
|
||||
console.log(user.firstName);
|
||||
console.log(user.lastName );
|
||||
console.log(user.alias);
|
||||
|
||||
let displayName = "No Display Name";
|
||||
|
||||
if (
|
||||
|
||||
@@ -51,7 +51,6 @@ class NavBar extends Component {
|
||||
componentDidMount() {
|
||||
|
||||
const userStored = localStorage.getItem('user');
|
||||
console.log(userStored);
|
||||
|
||||
if (userStored !== null && userStored !== undefined && userStored !== 'undefined') {
|
||||
const user = JSON.parse(userStored);
|
||||
@@ -64,9 +63,7 @@ class NavBar extends Component {
|
||||
} else {
|
||||
authId = user.authId;
|
||||
}
|
||||
|
||||
console.log("user", user);
|
||||
console.log("authid", authId);
|
||||
|
||||
this.setState({ authId: authId });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,12 +2,5 @@ import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import './index.css';
|
||||
import App from './App';
|
||||
//import {createStore} from 'redux';
|
||||
//import {Provider} from 'reaxt-redux';
|
||||
//import rootReducer from './reducers/rootReducer';
|
||||
|
||||
//const store = createStore(rootReducer);
|
||||
|
||||
//ReactDOM.render(<Provider store={store}<App /></Provider>, document.getElementById('root'));
|
||||
|
||||
ReactDOM.render(<App />, document.getElementById('root'));
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB |
@@ -1,15 +0,0 @@
|
||||
const initState = {
|
||||
user: {}
|
||||
}
|
||||
|
||||
const rootReducer = (state = initState, action) => {
|
||||
|
||||
if(action.type === 'USER_LOGS_IN'){
|
||||
return {
|
||||
user: action.user
|
||||
}
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
export default rootReducer
|
||||
Reference in new issue
Block a user