All files / src/components DateModified.tsx

100% Statements 3/3
100% Branches 0/0
100% Functions 1/1
100% Lines 3/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31                          4x 6x                   4x            
import React from 'react'
 
export interface DateModifiedProps {
  // text to be displayed
  text?: string
 
  // id of the element for testing if needed
  id?: string
}
 
/**
 * Contains build time stamp
 */
const DateModified: React.FC<DateModifiedProps> = ({ id, text }) => {
  return (
    <dl id={id} className="container mx-auto py-8 px-4">
      <dt className="inline mr-1">{text}</dt>
      <dd className="inline ml-1">
        <time>{process.env.NEXT_PUBLIC_BUILD_DATE}</time>
      </dd>
    </dl>
  )
}
 
DateModified.defaultProps = {
  id: 'date-modified',
  text: 'Date Modified:',
}
 
export default DateModified