Remove duplicated code for displaying payment components
Opened this issue · 1 comments
mini commented
What is being refactored
The payment components
Describe the change to be made
Currently there are duplicated scripts that retrieve and render the payments lists on the Dashboard and Payment page. This duplication should be removed.
Why is this happening
Bugfixes/improvements only need to happen in 1 place.
williamlixu commented
The duplicate code is found in Payments.js
and DashboardPayments.js
. Their componentDidMount()
functions take in the same API response and process them in the same way. This can be refactored so there is no duplicate code.