mirror of https://gitlab.com/ecentrics/concordia
Apostolos Fanakis
4 years ago
5 changed files with 33 additions and 2 deletions
@ -0,0 +1,4 @@ |
|||||
|
export const FORUM_EVENT_USER_SIGNED_UP = 'UserSignedUp'; |
||||
|
export const FORUM_EVENT_USERNAME_UPDATED = 'UsernameUpdated'; |
||||
|
export const FORUM_EVENT_TOPIC_CREATED = 'TopicCreated'; |
||||
|
export const FORUM_EVENT_POST_CREATED = 'PostCreated'; |
@ -0,0 +1,12 @@ |
|||||
|
import { put, takeEvery } from 'redux-saga/effects'; |
||||
|
import { CONTRACT_EVENT_FIRED } from '@ezerous/drizzle/src/contracts/constants'; |
||||
|
|
||||
|
function* eventBreakDown({ event }) { |
||||
|
yield put({ type: event.event, event: { ...event } }); |
||||
|
} |
||||
|
|
||||
|
function* eventSaga() { |
||||
|
yield takeEvery(CONTRACT_EVENT_FIRED, eventBreakDown); |
||||
|
} |
||||
|
|
||||
|
export default eventSaga; |
Loading…
Reference in new issue