|
|
@ -3,36 +3,36 @@ import { AppState } from "../interface"; |
|
|
|
|
|
|
|
|
|
|
|
export const appReducer = (state: AppState, action: AppAction): AppState => { |
|
|
|
export const appReducer = (state: AppState, action: AppAction): AppState => { |
|
|
|
switch (action.type) { |
|
|
|
switch (action.type) { |
|
|
|
case appActionTypes.setGitHubUser: { |
|
|
|
case appActionTypes.setGitHubUser: { |
|
|
|
return { |
|
|
|
return { |
|
|
|
...state, |
|
|
|
...state, |
|
|
|
gitHubUser: action.payload |
|
|
|
gitHubUser: action.payload |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
case appActionTypes.setCurrentBranch: { |
|
|
|
} |
|
|
|
return { |
|
|
|
case appActionTypes.setCurrentBranch: { |
|
|
|
...state, |
|
|
|
return { |
|
|
|
currentBranch: action.payload |
|
|
|
...state, |
|
|
|
} |
|
|
|
currentBranch: action.payload |
|
|
|
} |
|
|
|
} |
|
|
|
case appActionTypes.setNeedsGitInit: { |
|
|
|
} |
|
|
|
return { |
|
|
|
case appActionTypes.setNeedsGitInit: { |
|
|
|
...state, |
|
|
|
return { |
|
|
|
needsGitInit: action.payload |
|
|
|
...state, |
|
|
|
} |
|
|
|
needsGitInit: action.payload |
|
|
|
} |
|
|
|
} |
|
|
|
case appActionTypes.setCanUseGit: { |
|
|
|
} |
|
|
|
return { |
|
|
|
case appActionTypes.setCanUseGit: { |
|
|
|
...state, |
|
|
|
return { |
|
|
|
canUseGit: action.payload |
|
|
|
...state, |
|
|
|
} |
|
|
|
canUseGit: action.payload |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
case appActionTypes.setShowPopupPanel: { |
|
|
|
case appActionTypes.setShowPopupPanel: { |
|
|
|
return { |
|
|
|
return { |
|
|
|
...state, |
|
|
|
...state, |
|
|
|
showPopupPanel: action.payload |
|
|
|
showPopupPanel: action.payload |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |