Skip to content
This repository has been archived by the owner on May 15, 2021. It is now read-only.

Commit

Permalink
Merge pull request #166 from h-be/fix-signals
Browse files Browse the repository at this point in the history
gettting signals working again
  • Loading branch information
Connoropolous authored Dec 17, 2020
2 parents af48c2e + 5ac6cf6 commit 348ca5f
Show file tree
Hide file tree
Showing 11 changed files with 393 additions and 313 deletions.
10 changes: 10 additions & 0 deletions src/cells/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

const SET_PROFILES_CELL_ID = 'SET_PROFILES_CELL_ID'
const SET_PROJECTS_CELL_IDS = 'SET_PROJECTS_CELL_IDS'
const JOIN_PROJECT_CELL_ID = 'JOIN_PROJECT_CELL_ID'

/* action creator functions */

Expand All @@ -24,9 +25,18 @@ const setProjectsCellIds = cellIds => {
}
}

const joinProjectCellId = cellId => {
return {
type: JOIN_PROJECT_CELL_ID,
payload: cellId,
}
}

export {
SET_PROFILES_CELL_ID,
SET_PROJECTS_CELL_IDS,
JOIN_PROJECT_CELL_ID,
setProfilesCellId,
setProjectsCellIds,
joinProjectCellId
}
7 changes: 6 additions & 1 deletion src/cells/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import _ from 'lodash'
import {
createProjectMeta,
} from '../projects/project-meta/actions'
import { SET_PROFILES_CELL_ID, SET_PROJECTS_CELL_IDS } from './actions'
import { SET_PROFILES_CELL_ID, SET_PROJECTS_CELL_IDS, JOIN_PROJECT_CELL_ID } from './actions'

const defaultState = {
profiles: null,
Expand All @@ -27,6 +27,11 @@ export default function (state = defaultState, action) {
...state,
projects: [...state.projects, meta.cellIdString],
}
case JOIN_PROJECT_CELL_ID:
return {
...state,
projects: [...state.projects, payload],
}
default:
return state
}
Expand Down
Loading

0 comments on commit 348ca5f

Please sign in to comment.