Skip to content
This repository has been archived by the owner on Jul 9, 2019. It is now read-only.

Commit

Permalink
correctly pass props to review
Browse files Browse the repository at this point in the history
  • Loading branch information
James Baxley committed Dec 6, 2016
1 parent 4f98f6c commit 6f3c876
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 12 deletions.
43 changes: 33 additions & 10 deletions imports/pages/give/review/__tests__/__snapshots__/index.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,45 @@ exports[`GiveReviewTemplate returns <Error /> component based on state 1`] = `

exports[`GiveReviewTemplate returns <Layout /> component based on state 1`] = `
<Layout
data={
Object {
"payment": Object {
"icon": "Visa",
"type": "cc",
},
"personal": Object {
"campus": "Web",
"campusId": 20,
"email": "[email protected]",
"firstName": "Jeff",
"lastName": "Goldblumm",
},
}
}
onSubmit={[Function]}
payment={
savedAccount={
Object {
"icon": "Visa",
"type": "cc",
"date": null,
"id": 18376,
"name": "Jeff%27s%20NS%20Visa",
"payment": Object {
"accountNumber": "411111******1112",
"paymentType": "Visa",
},
}
}
personal={
state="done"
total={1}
transactions={
Object {
"campus": "Web",
"campusId": 20,
"email": "[email protected]",
"firstName": "Jeff",
"lastName": "Goldblumm",
"125": Object {
"label": "General%20Fund",
"value": 1,
},
}
} />
}
url={false}
userId="jY4RT2WK55yKYtj4y" />
`;

exports[`GiveReviewTemplate returns <Loading /> component based on state 1`] = `
Expand Down
3 changes: 1 addition & 2 deletions imports/pages/give/review/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ export class Template extends Component {

render() {
const { state, errors, total, data } = this.props.give;

switch (state) {
case "loading":
return <Loading msg="We're Processing Your Contribution" />;
Expand All @@ -97,7 +96,7 @@ export class Template extends Component {
onClick={() => {}}
/>);
default:
return <Layout {...data} onSubmit={this.onSubmit} />;
return <Layout {...this.props.give} onSubmit={this.onSubmit} />;
}
}
}
Expand Down

0 comments on commit 6f3c876

Please sign in to comment.