Skip to content

Commit

Permalink
feat(contribute): remove link to the page contributed to
Browse files Browse the repository at this point in the history
  • Loading branch information
lutangar committed Oct 3, 2019
1 parent 31e44cd commit c6ea836
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,4 @@ storiesOf('screens/Contribute/Submitted', module)
<Notification>{getStory()}</Notification>
</Router>
))
.add('normal', () => (
<SubmittedScreen
goBack={action('goBack')}
contribution={{
message:
"Je tiens à dire que la canicule, c'est une bonne chose pour les vieux.",
url: 'https://weather.com',
contributor: {
email: 'johan.dufour@gmail.com',
name: 'Johan Dufour'
},
intention: 'approval',
created: new Date()
}}
/>
));
.add('normal', () => <SubmittedScreen goBack={action('goBack')} />);
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
import React from 'react';

import { Button, CenterContainer, ExternalLink } from 'components/atoms';
import { Button, CenterContainer } from 'components/atoms';
import Container from './Container';
import Content from './Content';
import ContentTitle from './ContentTitle';
import Illustration from './Illustration';
import { Contribution } from 'app/lmem/notice';

export interface ContributionSubmittedScreenProps {
contribution: Contribution;
goBack: () => void;
}

export default ({ contribution, goBack }: ContributionSubmittedScreenProps) => (
export default ({ goBack }: ContributionSubmittedScreenProps) => (
<Container>
<Illustration />
<ContentTitle>Félicitations !</ContentTitle>
<Content>
Votre bulle sera publiée d’ici 24h sur :
<ExternalLink href={contribution.url}>{contribution.url}</ExternalLink>
Votre bulle sera publiée d’ici 24h, une confirmation vous sera envoyée par
email.
</Content>

<CenterContainer>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
import { connect } from 'react-redux';
import { replace } from 'connected-react-router';

import { close } from 'app/actions/ui';
import { ContentState } from 'app/content/store';
import { getContribution } from 'app/content/selectors';

const mapDispatchToProps = {
close,
goBack: () => replace('/')
};

export default connect(
(state: ContentState) => ({
contribution: getContribution(state)
}),
null,
mapDispatchToProps
);

0 comments on commit c6ea836

Please sign in to comment.