Last active
April 20, 2018 16:55
-
-
Save tastycode/ecd28068002531a133c5e0e43b611419 to your computer and use it in GitHub Desktop.
The arduous way
This file contains hidden or 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
// types.js | |
const REPORTER_PENDING_REPORT_UPDATE = "[reporter] pending report update" | |
// actions/reporter.js | |
export function reporterPendingReportUpdate() { | |
return { type: types.REPORTER_PENDING_REPORT_UPDATE } | |
} | |
// components/PromptHarm.js | |
import reporterActions from 'actions/reporter' | |
const PromptHarm = ({reporterPendingReportUpdate}) => ( <PromptContainer> | |
<PromptText>Is anyone at risk of immediate harm to themselves or others?</PromptText> | |
<PromptButtonsContainer> | |
<PromptButton onClick={reporterPendingReportUpdate} text="YES"/> | |
<PromptButton text="CANCEL"/> | |
</PromptButtonsContainer> | |
</PromptContainer> | |
) | |
connect(bindStateToProps, reporterActions)(PromptHarm) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment