New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
imprv: Make updatedAt SWR #4954
Conversation
@@ -20,7 +20,7 @@ | |||
data-page-created-at="{% if page %}{{ page.createdAt|datetz('Y/m/d H:i:s') }}{% endif %}" | |||
data-page-creator="{% if page && page.creator %}{{ page.creator|json }}{% endif %}" | |||
data-page-last-update-username="{% if page && page.lastUpdateUser %}{{ page.lastUpdateUser.name }}{% endif %}" | |||
data-page-updated-at="{% if page %}{{ page.updatedAt|datetz('Y/m/d H:i:s') }}{% endif %}" |
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.
1行目に {% if page %}があるので、 この中ではif文必要ないと判断し削除しました。
@@ -60,7 +63,7 @@ const AuthorInfo = (props) => { | |||
}; | |||
|
|||
AuthorInfo.propTypes = { | |||
date: PropTypes.string.isRequired, | |||
date: 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.
undifined
が帰ってくる可能性があるのでisRequired
をつけていません
const nullinfoLabelForFooter = mode === 'create' | ||
? 'Created by' | ||
: 'Updated by'; |
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.
Task
Note
View