-
Notifications
You must be signed in to change notification settings - Fork 59
Switching locations #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
also add test case for this function
This option allows setting the custom builder function in the config when creating the reducer’s initial state. When using all of the reducers together they make calls to the planTrip action, but there wasn’t really a way to pass in a custom function that way. For now it seems like the only way to do this could be to set something in the config of the state. This PR includes the work done in #12.
Codecov Report
@@ Coverage Diff @@
## dev #14 +/- ##
=======================================
- Coverage 7.2% 7.13% -0.08%
=======================================
Files 34 35 +1
Lines 555 575 +20
=======================================
+ Hits 40 41 +1
- Misses 515 534 +19
Continue to review full report at Codecov.
|
landonreed
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@evansiroky, just need you to remove an unused import and respond to question about filename.
example.js
Outdated
|
|
||
| // import Bootstrap Grid components for layout | ||
| import { Navbar, Grid, Row, Col } from 'react-bootstrap' | ||
| import { Navbar, Grid, Row, Col, Button } from 'react-bootstrap' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Button import is not used.
| @@ -0,0 +1,33 @@ | |||
| import React, { Component, PropTypes } from 'react' | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We seem to be naming files in hear with dashes fil-name.js, rather than camelCase. Any reason it was switched up here?
* Add Switch Button to lib * Alphabetize all the things in lib/index.js * rename file for switch button
|
I added the changes requested. Also, I don't particularly like where the switch button show up in the example. I merely added it so I could test out the functionality. It seems like every trip planner implements the switch button in a slightly different visual way. In my other project I'm mainly interested in using the new action that I made. |
This adds an action that will switch the from and to locations and then dispatch a trip plan action.
This PR builds on top of #13