-
Notifications
You must be signed in to change notification settings - Fork 5
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 #171 from enabledao/fix/#87_2
set up Toasts notifications
- Loading branch information
Showing
11 changed files
with
324 additions
and
145 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
import { combineReducers, createStore } from 'redux' | ||
import { composeWithDevTools } from 'redux-devtools-extension' | ||
import { networkId } from './networkId' | ||
import { toastProvider } from './toastProvider' | ||
|
||
const rootReducer = combineReducers({ | ||
networkId, | ||
toastProvider, | ||
}) | ||
|
||
export const store = createStore(rootReducer, composeWithDevTools()) |
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,20 @@ | ||
// Actions | ||
export const SET_TOAST_PROVIDER = 'SET_TOAST_PROVIDER' | ||
|
||
// Action creator | ||
export const setToastProvider = provider => { | ||
return { | ||
type: SET_TOAST_PROVIDER, | ||
provider, | ||
} | ||
} | ||
|
||
// Reducer | ||
export const toastProvider = (state = '', action) => { | ||
switch (action.type) { | ||
case SET_TOAST_PROVIDER: | ||
return (state = action.provider) | ||
default: | ||
return state | ||
} | ||
} |
Oops, something went wrong.