Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
A React/Typescript widget which accesses Septa Rails data from the fares.json provided and applies the data in a user-friendly form which calculates the ticket(s) price.
Notes
Please read my comments provided in the code. I have left notes on how I would complete the functionality with more time. If you open the console, you will see the data accessed by the api call and the form data once all the fields have been filled. I focused on keeping the styles very basic due to time constraints. In a situation with even more time, I might consider a refactor with each form field being a component that takes props for question, input type, and data. I hope you enjoy reading my code, and I look forward to your feedback!
Libraries
react-hook-form
Screenshots