Edited ExpenseForm.js 'handleSubmit()' section within the 'edit', (obj.firebaseKey), statement.
Put in conditional: if the router path is equivalent to the timeline page, route back to the main page. Else, route to the timeline page. Accessed the router object at the .pathname property for the conditional.
Added this ONLY to the edit section, as expenses can't be added (created) within the timeline page, so routing wouldn't be an issue here.
Related Issue
43
Motivation and Context
While this change doesn't impact functionality, it is a necessary implementation for user experience. Originally, the expense would be reported, but the form wouldn't close/change. However, now, at least the alternate routing gives the illusion of the form closing, while a more permanent fix to the component-popup-form hierarchy is established.
How Can This Be Tested?
Pull PR branch
Install needed dependencies
Go to 'Timeline' page and select any month with expenses.
Select on the 'edit' button.
Edit any value within the expenses.
Press 'enter' or 'submit'.
You should be routed to a different page.
Screenshots (if appropriate):
N / A
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Description
Related Issue
43
Motivation and Context
How Can This Be Tested?
Screenshots (if appropriate):
N / A
Types of changes