Skip to content

Commit

Permalink
Improved directory structure.
Browse files Browse the repository at this point in the history
  • Loading branch information
OnlyOneJMJQ committed Feb 14, 2017
1 parent 711b482 commit 795073d
Show file tree
Hide file tree
Showing 21 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { Link } from 'react-router'
import { HiddenOnlyAuth, VisibleOnlyAuth } from './util/wrappers.js'

// UI Components
import LoginButtonContainer from './login/LoginButtonContainer'
import LogoutButtonContainer from './logoutbutton/LogoutButtonContainer'
import LoginButtonContainer from './user/ui/loginbutton/LoginButtonContainer'
import LogoutButtonContainer from './user/ui/logoutbutton/LogoutButtonContainer'

// Styles
import './css/oswald.css'
Expand Down
1 change: 0 additions & 1 deletion src/img/uport-logo.svg

This file was deleted.

11 changes: 6 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ import { Provider } from 'react-redux'
import { syncHistoryWithStore } from 'react-router-redux'
import { UserIsAuthenticated, UserIsNotAuthenticated } from './util/wrappers.js'

// Components
// Layouts
import App from './App';
import Home from './home/Home';
import Dashboard from './dashboard/Dashboard';
import SignUp from './signup/SignUp';
import Profile from './profile/Profile';
import Home from './layouts/home/Home';
import Dashboard from './layouts/dashboard/Dashboard';
import SignUp from './user/layouts/signup/SignUp';
import Profile from './user/layouts/profile/Profile';

// Redux Store
import store from './store';

// Config
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/reducer.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { combineReducers } from 'redux'
import { routerReducer } from 'react-router-redux'
import loginReducer from './login/loginReducer'
import userReducer from './user/userReducer'

const reducer = combineReducers({
routing: routerReducer,
user: loginReducer
user: userReducer
})

export default reducer
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from 'react'
import ProfileFormContainer from '../profileform/ProfileFormContainer'
import ProfileFormContainer from '../../ui/profileform/ProfileFormContainer'

class Profile extends Component {
render() {
Expand Down
2 changes: 1 addition & 1 deletion src/signup/SignUp.js → src/user/layouts/signup/SignUp.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from 'react'
import SignUpFormContainer from '../signupform/SignUpFormContainer'
import SignUpFormContainer from '../../ui/signupform/SignUpFormContainer'

class SignUp extends Component {
render() {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Web3 from 'web3'
import AuthenticationContract from '../../build/contracts/Authentication.json'
import AuthenticationContract from '../../../../build/contracts/Authentication.json'
import { browserHistory } from 'react-router'

const provider = new Web3.providers.HttpProvider('http://localhost:8545')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { connect } from 'react-redux'
import LoginButton from './LoginButton'
import { loginUser } from './LoginActions'
import { loginUser } from './LoginButtonActions'

const mapStateToProps = (state, ownProps) => {
return {}
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { connect } from 'react-redux'
import LogoutButton from './LogoutButton'
import { logoutUser } from './LogoutActions'
import { logoutUser } from './LogoutButtonActions'

const mapStateToProps = (state, ownProps) => {
return {}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Web3 from 'web3'
import AuthenticationContract from '../../build/contracts/Authentication.json'
import AuthenticationContract from '../../../../build/contracts/Authentication.json'
import { browserHistory } from 'react-router'

const provider = new Web3.providers.HttpProvider('http://localhost:8545')
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Web3 from 'web3'
import AuthenticationContract from '../../build/contracts/Authentication.json'
import { loginUser } from '../login/LoginActions'
import AuthenticationContract from '../../../../build/contracts/Authentication.json'
import { loginUser } from '../loginbutton/LoginButtonActions'
import { browserHistory } from 'react-router'

const provider = new Web3.providers.HttpProvider('http://localhost:8545')
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/login/loginReducer.js → src/user/userReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const initialState = {
data: null
}

const loginReducer = (state = initialState, action) => {
const userReducer = (state = initialState, action) => {
if (action.type === 'USER_LOGGED_IN' || action.type === 'USER_UPDATED')
{
return Object.assign({}, state, {
Expand All @@ -20,4 +20,4 @@ const loginReducer = (state = initialState, action) => {
return state
}

export default loginReducer
export default userReducer

0 comments on commit 795073d

Please sign in to comment.