Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions septa-fare-calculator-solution/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.idea/
.vscode/
node_modules/
build/
.DS_Store
*.tgz
my-app*
template/src/__tests__/__snapshots__/
lerna-debug.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
/.changelog
.npm/
23 changes: 23 additions & 0 deletions septa-fare-calculator-solution/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Septa Fare Calculator - Jonathan Bui
## Time Spent
In total I spent close to 2 hours on this with roughly half my time spent on developing the view and the other half on integrating `fares.json` and implementing calculation logic
## Technologies Used
- creat-react-app
- styled-components
## Setup
1. Run `npm install`
2. Run `npm run start`
3. Navigate to `localhost:3000` to view Septa Fare Calculator
## Room For Improvement
- Further generalize components
- An example is `RadioButtonGroup.jsx` which has logic specific to handling when a user selects their trip type as 'anytime'. This can be refactored so the logic is in the parent and `RadioButtonGroup.jsx` can become a general component that can be shared in other applications
- Create `styled-components` themes to store commonly used variables such as color
- Move static text to a config file. This can be useful for internationalization
- Create a custom hook for fetching fare data
- This can further generalize that application since it makes it easier to swap out what api is being used
- Transform `Fares.json` so that it's structure is more compatible with the design spec
- Add `prop-types` to ensure components use the correct data type and pass the right data
- Minor clean up around updating things such as favicon, updating title, removing unused files, etc.



Loading