From 860c4c22d7c543ce04f5d2677ee3c0184fdbea3e Mon Sep 17 00:00:00 2001 From: AlexisG Date: Fri, 20 Dec 2024 14:29:04 +0100 Subject: [PATCH] feat(LastUpdate): Add propTypes --- src/modules/filelist/cells/LastUpdate.jsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/modules/filelist/cells/LastUpdate.jsx b/src/modules/filelist/cells/LastUpdate.jsx index e27706b87e..7cd1ea77e1 100644 --- a/src/modules/filelist/cells/LastUpdate.jsx +++ b/src/modules/filelist/cells/LastUpdate.jsx @@ -1,4 +1,5 @@ import cx from 'classnames' +import PropTypes from 'prop-types' import React from 'react' import { TableCell } from 'cozy-ui/transpiled/react/deprecated/Table' @@ -6,7 +7,7 @@ import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n' import styles from 'styles/filelist.styl' -const _LastUpdate = ({ date, formatted = '—' }) => { +const LastUpdate = ({ date, formatted = '—' }) => { const { f, t } = useI18n() return ( @@ -21,6 +22,9 @@ const _LastUpdate = ({ date, formatted = '—' }) => { ) } -const LastUpdate = React.memo(_LastUpdate) +LastUpdate.propTypes = { + date: PropTypes.string, + formatted: PropTypes.string +} -export default LastUpdate +export default React.memo(LastUpdate)