mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-15 02:36:36 +00:00
use webpack & add some styles
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
import {combineReducers} from 'redux'
|
||||
import { combineReducers } from 'redux'
|
||||
import { USER_UPDATE } from './actions'
|
||||
|
||||
const initialCurrentUser = JSON.parse(localStorage.getItem('currentUser'))
|
||||
|
||||
function currentUser (state, action) {
|
||||
switch (action.type) {
|
||||
|
||||
case USER_UPDATE:
|
||||
let user = action.data
|
||||
localStorage.setItem('currentUser', JSON.stringify(user))
|
||||
return user
|
||||
default:
|
||||
return initialCurrentUser
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user