Skip to content

Commit

Permalink
fix(studies): SJIP-1104 add empty links on part and file
Browse files Browse the repository at this point in the history
  • Loading branch information
AltefrohneGaelle authored Dec 3, 2024
1 parent 20b5e78 commit f6b16df
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions src/views/PublicStudies/utils.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -56,7 +55,7 @@ export const getColumns = (): ProColumnType<any>[] => [
title: intl.get('entities.study.code'),
dataIndex: 'study_code',
// TODO Open modal
render: (study_code: string) => <Link to={''}>{study_code}</Link>,
render: (study_code: string) => <a>{study_code}</a>,
},
{
key: 'study_name',
Expand Down Expand Up @@ -144,10 +143,12 @@ export const getColumns = (): ProColumnType<any>[] => [
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
<a>{numberWithCommas(participantCount)}</a>
) : (
participantCount || TABLE_EMPTY_PLACE_HOLDER
);
},
},
{
Expand All @@ -156,10 +157,12 @@ export const getColumns = (): ProColumnType<any>[] => [
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
<a>{numberWithCommas(fileCount)}</a>
) : (
fileCount || TABLE_EMPTY_PLACE_HOLDER
);
},
},
{
Expand Down

0 comments on commit f6b16df

Please sign in to comment.