Skip to content

Commit

Permalink
Fix native initialTabState setup
Browse files Browse the repository at this point in the history
  • Loading branch information
chromakode committed Aug 2, 2016
1 parent b9e1081 commit 5e6d995
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions shared/local-debug.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* File to stash local debug changes to. Never check this in with changes
*/

import {createRouterState} from './reducers/router'
import {updateDebugConfig} from './actions/dev'
import * as Tabs from './constants/tabs'

Expand All @@ -17,6 +16,7 @@ let config = {
devStoreChangingFunctions: false,
printOutstandingRPCs: false,
reactPerf: false,
initialTabState: {},
overrideLoggedInTab: null,
printRoutes: false,
logStatFrequency: 0,
Expand All @@ -34,6 +34,10 @@ if (__DEV__ && true) {
config.devStoreChangingFunctions = true
config.printOutstandingRPCs = true
config.reactPerf = false
config.initialTabState = {
[Tabs.loginTab]: [],
[Tabs.settingsTab]: ['devMenu', 'dumbSheet'],
}
config.overrideLoggedInTab = Tabs.settingsTab
config.dumbFilter = ''
config.dumbIndex = 0
Expand All @@ -59,20 +63,12 @@ export const {
actionStatFrequency,
} = config

export function initTabbedRouterState (state) {
export function initTabbedRouterState () {
if (!__DEV__) {
return state
return []
}

return {
...state,
tabs: {
...state.tabs,
[Tabs.loginTab]: createRouterState([], []),
[Tabs.settingsTab]: createRouterState(['devMenu', 'dumbSheet'], []),
},
activeTab: Tabs.settingsTab,
}
return config.initialTabState
}

export function setup (store) {
Expand Down

0 comments on commit 5e6d995

Please sign in to comment.