Refactor
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
import { ActionTypes, NodeOrder } from '../reducers'
|
||||
import { ActionTypes, NodeOrder, CustomAction } from '../reducers'
|
||||
|
||||
export const setAutoExpandLimit = (autoExpandLimit: number = 0) => {
|
||||
export const setAutoExpandLimit = (autoExpandLimit: number = 0): CustomAction => {
|
||||
return {
|
||||
autoExpandLimit,
|
||||
type: ActionTypes.setAutoExpandLimit,
|
||||
}
|
||||
}
|
||||
|
||||
export const toggleSettingsVisibility = () => {
|
||||
export const toggleSettingsVisibility = (): CustomAction => {
|
||||
return {
|
||||
type: ActionTypes.toggleSettingsVisibility,
|
||||
}
|
||||
}
|
||||
|
||||
export const setNodeOrder = (nodeOrder: NodeOrder = NodeOrder.none) => {
|
||||
export const setNodeOrder = (nodeOrder: NodeOrder = NodeOrder.none): CustomAction => {
|
||||
return {
|
||||
nodeOrder,
|
||||
type: ActionTypes.setNodeOrder,
|
||||
|
||||
15
app/src/actions/Sidebar.ts
Normal file
15
app/src/actions/Sidebar.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { ActionTypes, CustomAction } from '../reducers'
|
||||
|
||||
export const setPublishTopic = (topic: string): CustomAction => {
|
||||
return {
|
||||
publishTopic: topic,
|
||||
type: ActionTypes.setPublishTopic,
|
||||
}
|
||||
}
|
||||
|
||||
export const setPublishPayload = (payload: string): CustomAction => {
|
||||
return {
|
||||
publishPayload: payload,
|
||||
type: ActionTypes.setPublishPayload,
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ActionTypes } from '../reducers'
|
||||
import { ActionTypes, CustomAction } from '../reducers'
|
||||
import * as q from '../../../backend/src/Model'
|
||||
|
||||
export const selectTopic = (topic: q.TreeNode) => {
|
||||
export const selectTopic = (topic: q.TreeNode): CustomAction => {
|
||||
return {
|
||||
selectedTopic: topic,
|
||||
type: ActionTypes.selectTopic,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import * as settingsActions from './Settings'
|
||||
import * as treeActions from './Tree'
|
||||
import * as sidebarActions from './Sidebar'
|
||||
|
||||
export { settingsActions, treeActions }
|
||||
export { settingsActions, treeActions, sidebarActions }
|
||||
|
||||
Reference in New Issue
Block a user