|
1
|
import { useTranslation } from "react-i18next" |
|
2
|
import { DateCell } from "../../common/date-cell" |
|
3
|
import { PlaceholderCell } from "../../common/placeholder-cell" |
|
4
|
|
|
5
|
type FirstSeenCellProps = { |
|
6
|
createdAt?: Date | string | null |
|
7
|
} |
|
8
|
|
|
9
|
export const FirstSeenCell = ({ createdAt }: FirstSeenCellProps) => { |
|
10
|
if (!createdAt) { |
|
11
|
return <PlaceholderCell /> |
|
12
|
} |
|
13
|
|
|
14
|
return <DateCell date={createdAt} /> |
|
15
|
} |
|
16
|
|
|
17
|
export const FirstSeenHeader = () => { |
|
18
|
const { t } = useTranslation() |
|
19
|
|
|
20
|
return ( |
|
21
|
<div className="flex h-full w-full items-center"> |
|
22
|
<span className="truncate">{t("fields.createdAt")}</span> |
|
23
|
</div> |
|
24
|
) |
|
25
|
} |