Skip to content

Commit

Permalink
feat(LastUpdate): Add propTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
Merkur39 committed Dec 23, 2024
1 parent 05cf7bf commit 860c4c2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/modules/filelist/cells/LastUpdate.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import cx from 'classnames'
import PropTypes from 'prop-types'
import React from 'react'

import { TableCell } from 'cozy-ui/transpiled/react/deprecated/Table'
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 (
Expand All @@ -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)

0 comments on commit 860c4c2

Please sign in to comment.