Skip to content

Commit

Permalink
NFINT-906
Browse files Browse the repository at this point in the history
  • Loading branch information
jay-hodgson committed Sep 12, 2023
1 parent 5cf8b55 commit 2aae237
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import MarkdownSynapse from '../Markdown/MarkdownSynapse'
import { isEmpty } from 'lodash-es'
import { getColumnIndex, getValueOrMultiValue } from './GenericCard'
import { UserBadge } from '../UserCard/UserBadge'
import { formatDate } from '../../utils/functions/DateFormatter'
import dayjs from 'dayjs'

type SynapseCardLabelProps = {
value: string
Expand Down Expand Up @@ -82,6 +84,11 @@ export const SynapseCardLabel: React.FC<SynapseCardLabelProps> = props => {
return <UserBadge userId={str} className={newClassName} />
}

// NFINT-906
if (columnModelType === ColumnTypeEnum.DATE && str) {
return <p>{formatDate(dayjs(Number(str)))}</p>
}

if (!labelLink) {
// if this looks like a Synapse ID, then autolink.
if (str.match(SYNAPSE_ENTITY_ID_REGEX)) {
Expand Down

0 comments on commit 2aae237

Please sign in to comment.