Skip to content

Commit

Permalink
Merge pull request #17 from politics-rewired/politics-rewired/add-cam…
Browse files Browse the repository at this point in the history
…paign-copy-feedback

add campaign copy feedback
  • Loading branch information
bchrobot authored Feb 1, 2019
2 parents e5c51f2 + 56fbe20 commit 011e407
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/containers/AdminCampaignStats.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,10 @@ class AdminCampaignStats extends React.Component {
<RaisedButton
{...dataTest('copyCampaign')}
label='Copy Campaign'
onTouchTap={async() => await this.props.mutations.copyCampaign(this.props.params.campaignId)}
onTouchTap={async() => {
await this.props.mutations.copyCampaign(this.props.params.campaignId)
this.setState({ campaignJustCopied: true })
}}
/>)
] : null}
</div>
Expand Down Expand Up @@ -258,6 +261,14 @@ class AdminCampaignStats extends React.Component {
this.setState({ exportMessageOpen: false })
}}
/>
<Snackbar
open={this.state.campaignJustCopied}
message='Campaign successfully copied. Click "Campaigns" to see it'
autoHideDuration={5000}
onRequestClose={() => {
this.setState({ campaignJustCopied: false })
}}
/>
</div>
)
}
Expand Down

0 comments on commit 011e407

Please sign in to comment.