-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(story-layer): add layer to story slide
- Loading branch information
1 parent
cdd2006
commit 77e3017
Showing
11 changed files
with
92 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import {StoryLayer} from '../types/story-layer'; | ||
|
||
export const SET_STORY_LAYER = 'SET_STORY_LAYER'; | ||
|
||
export interface SetStoryLayerAction { | ||
type: typeof SET_STORY_LAYER; | ||
storyLayer: StoryLayer | null; | ||
} | ||
|
||
const setStoryLayerAction = ( | ||
storyLayer: StoryLayer | null | ||
): SetStoryLayerAction => ({ | ||
type: SET_STORY_LAYER, | ||
storyLayer | ||
}); | ||
|
||
export default setStoryLayerAction; |
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,17 @@ | ||
import {SET_STORY_LAYER, SetStoryLayerAction} from '../actions/set-story-layer'; | ||
|
||
import {StoryLayer} from '../types/story-layer'; | ||
|
||
function storyLayerReducer( | ||
state: StoryLayer | null = null, | ||
action: SetStoryLayerAction | ||
): StoryLayer | null { | ||
switch (action.type) { | ||
case SET_STORY_LAYER: | ||
return action.storyLayer; | ||
default: | ||
return state; | ||
} | ||
} | ||
|
||
export default storyLayerReducer; |
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,7 @@ | ||
import {State} from '../reducers/index'; | ||
|
||
import {StoryLayer} from '../types/story-layer'; | ||
|
||
export function storyLayerSelector(state: State): StoryLayer | null { | ||
return state.storyLayer; | ||
} |
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,4 @@ | ||
export interface StoryLayer { | ||
id: string; | ||
timestamp: number; // ISO 8601 timestamp | ||
} |
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