From f6b16df87bd303cc79daf1f03c6f67594c0f7b90 Mon Sep 17 00:00:00 2001 From: Gaelle <133775440+AltefrohneGaelle@users.noreply.github.com> Date: Tue, 3 Dec 2024 09:14:05 -0500 Subject: [PATCH] fix(studies): SJIP-1104 add empty links on part and file --- src/views/PublicStudies/utils.tsx | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/views/PublicStudies/utils.tsx b/src/views/PublicStudies/utils.tsx index 7f6f1b61..09b3f31d 100644 --- a/src/views/PublicStudies/utils.tsx +++ b/src/views/PublicStudies/utils.tsx @@ -1,5 +1,4 @@ import intl from 'react-intl-universal'; -import { Link } from 'react-router-dom'; import { AuditOutlined } from '@ant-design/icons'; import ExternalLink from '@ferlab/ui/core/components/ExternalLink'; import { ProColumnType } from '@ferlab/ui/core/components/ProTable/types'; @@ -56,7 +55,7 @@ export const getColumns = (): ProColumnType[] => [ title: intl.get('entities.study.code'), dataIndex: 'study_code', // TODO Open modal - render: (study_code: string) => {study_code}, + render: (study_code: string) => {study_code}, }, { key: 'study_name', @@ -144,10 +143,12 @@ export const getColumns = (): ProColumnType[] => [ render: (record: IStudiesParticipants) => { const participantCount = record?.participant_count || 0; - return participantCount - ? // TODO Open modal - numberWithCommas(participantCount) - : participantCount || TABLE_EMPTY_PLACE_HOLDER; + return participantCount ? ( + // TODO Open modal + {numberWithCommas(participantCount)} + ) : ( + participantCount || TABLE_EMPTY_PLACE_HOLDER + ); }, }, { @@ -156,10 +157,12 @@ export const getColumns = (): ProColumnType[] => [ render: (record: IStudiesParticipants) => { const fileCount = record?.file_count || 0; - return fileCount - ? // TODO Open modal - numberWithCommas(fileCount) - : fileCount || TABLE_EMPTY_PLACE_HOLDER; + return fileCount ? ( + // TODO Open modal + {numberWithCommas(fileCount)} + ) : ( + fileCount || TABLE_EMPTY_PLACE_HOLDER + ); }, }, {