-
Notifications
You must be signed in to change notification settings - Fork 216
Conversation
⚡️ Thanks for opening this pull request! ⚡️
|
8b89cda
to
b71959c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one @rahulbile . A few comments/suggestions
5778305
to
85e3d73
Compare
a203b77
to
fffda3f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am seeing the following error in the console:
Warning: Failed prop type: Invalid prop
value
supplied toFormattedDateTime
Happens after sending an on chain transaction, whist it's in pending state:
It also seems to happen when the activity list first loads
|
||
const Row = ({ style, item, RowComponent }) => ( | ||
<div style={style}> | ||
{item.title ? ( | ||
<Box mt={4} pl={4}> | ||
<Heading.H4 fontWeight="normal"> | ||
<FormattedDate day="2-digit" month="short" value={item.title} year="numeric" /> | ||
<FormattedDateTime format="date" month="short" value={item.title} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this is what's causing the prop warning? What is title
? Is it always a string or Date?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah looks like in some cases its not a date, so have updated the value validation to be: PropTypes.any, will that be fine? Doing so the error does go away, shall we format the value before sending or any validation is fine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess really the component supports dates passed as string
(which is what item.title
is). Probably should update component prop type definition to oneOfType([PropTypes.number, PropTypes.string, PropTypes.instanceOf(Date)])
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, adding that works fine and also fixes the validation issue. Updated the PR
cbd19ee
to
1ab88ed
Compare
1ab88ed
to
aae3838
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested ACK aae3838
Congrats on merging your first pull request! ⚡️⚡️⚡️ |
Description:
Currently, the time displayed in-app for transactions is in 12 hour mode, some users may prefer to change it to 24 hour display mode
Motivation and Context:
The feature request was requested in #3600 and while doing this change, the display of dates across the app is refactored to have more control on formats and making sure its extensible in future easily
Types of changes:
Feature
Checklist: