This repository has been archived by the owner on Feb 15, 2023. It is now read-only.
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.
Changes
,
and `` methods toorderList.js
componentformat24Hour
for each order's hour, minute and second as arguments.Purpose
Javascript's
Date
object returns single digit hour, minute and second without a0
padding.Approach
This common front-end problem could be solved in three common ways....
moment.js
to handle these use-cases.dates.js
In-component
solution to handle only this specific case.I elected for the 3rd, and simplest solution for this use-case. Perhaps creating another issue to look deeper into this is needed. Or, could be added as a discussion point for a future meeting / topic.
Pre-Testing TODOs
docker compose up
npm start
localhost:3000
in your browser and login (NOTE: any email & password will be accepted)Testing Steps
Learning
Closes #2