The DowntimeNotification code is used by and has modifications from multiple teams. However, the code uses a fair amount of legacy code that negatively impacts application performance.
We should refactor the platform DowntimeNotification component to remove legacy code and patterns, which can improve performance for any VA application that uses the DowntimeNotification component.
We can improve performance by removing momentjs, which seems to only be used for date parsing, and there are better alternatives.
We can improve compatibility with modern React by converting the components from legacy React APIs, specifically be converting from a class-based component to a function component.
Daniel has noticed date-fns library elsewhere on VAgov, seems like the logical substitute. Beware incompatibilities with moment.js.
Possible tasks:
[ ] Remove Momentjs library, use vanilla JS Date functions and/or date-fns library. Notify/discuss with app teams, e.g. VAOS/appointments team, that may have deeper dependencies on momentjs
[ ] Refactor React components to functional (rather than class) components
Description
The DowntimeNotification code is used by and has modifications from multiple teams. However, the code uses a fair amount of legacy code that negatively impacts application performance.
We should refactor the platform DowntimeNotification component to remove legacy code and patterns, which can improve performance for any VA application that uses the DowntimeNotification component.
We can improve performance by removing momentjs, which seems to only be used for date parsing, and there are better alternatives.
We can improve compatibility with modern React by converting the components from legacy React APIs, specifically be converting from a class-based component to a function component.
User story
Notes
Possible tasks:
Acceptance criteria