Skip to content

Commit

Permalink
Modularise CompleteButton component
Browse files Browse the repository at this point in the history
Relates #125
  • Loading branch information
martingaston committed Oct 17, 2018
1 parent d7cb822 commit 8f6dd28
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/TopBar/CompleteButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import { Link } from "react-router-dom";
export default class CompleteButton extends React.Component {
render() {
return (
<Link to={`/${this.props.exam}`}>
<React.Fragment>
{this.props.exam && `<Link to=${this.props.exam}>`}
<button
id="complete"
data-testid="complete"
Expand All @@ -19,7 +20,8 @@ export default class CompleteButton extends React.Component {
>
<img src={tickIcon} />
</button>
</Link>
{this.props.exam && `</Link>`}
</React.Fragment>
);
}
}
Expand Down

0 comments on commit 8f6dd28

Please sign in to comment.