Skip to content

Commit 15e5271

Browse files
committed
fix: adjust removeSubjectIdScope methods to a shorter notation
1 parent 0d0eac9 commit 15e5271

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

apps/web/src/features/datahub/components/MasterDataTable.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ export const MasterDataTable = ({ data, onSelect }: MasterDataTableProps) => {
1818
<ClientTable<Subject>
1919
columns={[
2020
{
21-
field: (subject) =>
22-
subjectIdDisplaySetting
23-
? removeSubjectIdScope(subject.id).slice(0, subjectIdDisplaySetting)
24-
: removeSubjectIdScope(subject.id).slice(0, 9),
21+
field: (subject) => removeSubjectIdScope(subject.id).slice(0, subjectIdDisplaySetting ?? 9),
2522
label: t('datahub.index.table.subject')
2623
},
2724
{

apps/web/src/features/datahub/components/SubjectLayout.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ export const SubjectLayout = () => {
2828
en: 'Instrument Records for Subject {}',
2929
fr: "Dossiers d'instruments pour le client {}"
3030
},
31-
subjectIdDisplaySetting
32-
? removeSubjectIdScope(subjectId).slice(0, subjectIdDisplaySetting)
33-
: removeSubjectIdScope(subjectId).slice(0, 9)
31+
removeSubjectIdScope(subjectId).slice(0, subjectIdDisplaySetting ?? 9)
3432
)}
3533
</Heading>
3634
</PageHeader>

0 commit comments

Comments
 (0)