-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from masuP9/fix/can-edit-client-side-routing
Fix/can edit client side routing
- Loading branch information
Showing
8 changed files
with
57 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { combineReducers } from 'redux'; | ||
import { imageReducer } from './imageReducer'; | ||
import { observerReducer } from './observerReducer'; | ||
|
||
export const rootReducer = combineReducers({ | ||
image: imageReducer, | ||
observer: observerReducer, | ||
}); | ||
export type AppState = ReturnType<typeof rootReducer>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { OBSERVE_EDITOR, ActionTypes } from '../actions'; | ||
|
||
export type State = { | ||
observingEditor: Boolean; | ||
}; | ||
|
||
const initialState: State = { | ||
observingEditor: false, | ||
}; | ||
|
||
type Action = ActionTypes; | ||
|
||
export function observerReducer(state = initialState, action: Action) { | ||
switch (action.type) { | ||
case OBSERVE_EDITOR: { | ||
return { | ||
...state, | ||
observingEditor: action.payload, | ||
}; | ||
} | ||
default: | ||
return state; | ||
} | ||
} |