diff --git a/src/components/auth/BaseAuthBody.jsx b/src/components/auth/BaseAuthBody.jsx index 8184376..0548188 100644 --- a/src/components/auth/BaseAuthBody.jsx +++ b/src/components/auth/BaseAuthBody.jsx @@ -11,7 +11,6 @@ export default class BaseAuthBody extends Component { static contextTypes = { clearErrors: PropTypes.func.isRequired, resolve: PropTypes.func.isRequired, - reject: PropTypes.func.isRequired, auth: PropTypes.shape({ error: PropTypes.string, scopes: PropTypes.array diff --git a/src/components/auth/RejectionLink.jsx b/src/components/auth/RejectionLink.jsx new file mode 100644 index 0000000..6af51f8 --- /dev/null +++ b/src/components/auth/RejectionLink.jsx @@ -0,0 +1,25 @@ +import React, { PropTypes } from 'react'; + +import { FormattedMessage as Message } from 'react-intl'; + +export default function RejectionLink(props, context) { + return ( + { + event.preventDefault(); + + context.reject(); + }}> + + + ); +} + +RejectionLink.displayName = 'RejectionLink'; +RejectionLink.propTypes = { + label: PropTypes.shape({ + id: PropTypes.string + }).isRequired +}; +RejectionLink.contextTypes = { + reject: PropTypes.func.isRequired +}; diff --git a/src/components/auth/activation/Activation.jsx b/src/components/auth/activation/Activation.jsx index 13f359b..3ef3158 100644 --- a/src/components/auth/activation/Activation.jsx +++ b/src/components/auth/activation/Activation.jsx @@ -1,8 +1,7 @@ import React from 'react'; -import { FormattedMessage as Message } from 'react-intl'; - import { Button } from 'components/ui/form'; +import RejectionLink from 'components/auth/RejectionLink'; import AuthTitle from 'components/auth/AuthTitle'; import messages from './Activation.intl.json'; @@ -13,10 +12,6 @@ export default function Activation() { Title: () => , Body, Footer: () =>