import * as constants from '../constants/ActionTypes'

export default function user (state = {username: null}, action) {
  switch (action.type) {
  case constants.USER_LOGGED_IN:
    state = {
      username: action.username
    }
    return state
  case constants.USER_LOGGED_OUT:
    state = {
      username: null
    }
    return state
  default:
    return state
  }
}

@@ -48,16 +48,71 @@
 Types'%0A%0A
+const initialState = %7B%0A  details: null,%0A  repos: %5B%5D%0A%7D%0A%0A
 export d
@@ -145,24 +145,20 @@
 e = 
-%7Busername: null%7D
+initialState
 , ac
@@ -243,24 +243,52 @@
 %7B%0A      
-username
+details: action.details,%0A      repos
 : action
@@ -288,24 +288,21 @@
  action.
-username
+repos
 %0A    %7D%0A 
@@ -367,36 +367,20 @@
 e = 
-%7B%0A      username: null%0A    %7D
+initialState
 %0A   

add initial state & reference repos action