From af2541a75c784275ffd302ca9f80c7cb68cc7eb8 Mon Sep 17 00:00:00 2001 From: tidbit1 <194808961+tidbit1@users.noreply.github.com> Date: Tue, 17 Jun 2025 14:50:08 +0100 Subject: [PATCH] fix incorrect identifier for duplicate issues --- src/components/RelationshipItem/RelationshipItem.tsx | 2 +- src/pages/AddRelationshipPage/AddRelationshipPage.tsx | 2 +- src/types/relationships.ts | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/RelationshipItem/RelationshipItem.tsx b/src/components/RelationshipItem/RelationshipItem.tsx index 17df159..7f6ba0f 100644 --- a/src/components/RelationshipItem/RelationshipItem.tsx +++ b/src/components/RelationshipItem/RelationshipItem.tsx @@ -8,7 +8,7 @@ interface RelationshipItem { }; export function RelationshipItem({ relation }: RelationshipItem) { - const label = RELATIONSHIP_LABELS[relation.type as RelationshipType] || relation.type; + const label = RELATIONSHIP_LABELS[relation.type as RelationshipType]; return ( <> diff --git a/src/pages/AddRelationshipPage/AddRelationshipPage.tsx b/src/pages/AddRelationshipPage/AddRelationshipPage.tsx index 56a2885..4f4c3d0 100644 --- a/src/pages/AddRelationshipPage/AddRelationshipPage.tsx +++ b/src/pages/AddRelationshipPage/AddRelationshipPage.tsx @@ -60,7 +60,7 @@ export function AddRelationshipPage() { }; }; - if (selectedType === 'duplicates') { + if (selectedType === 'duplicate') { input.type = 'duplicate'; }; diff --git a/src/types/relationships.ts b/src/types/relationships.ts index 309e6cf..e02fddb 100644 --- a/src/types/relationships.ts +++ b/src/types/relationships.ts @@ -1,9 +1,9 @@ -export type RelationshipType = 'related' | 'blocks' | 'duplicates' | 'blocked' | 'duplicated'; +export type RelationshipType = 'related' | 'blocks' | 'duplicate' | 'blocked' | 'duplicated'; export const RELATIONSHIP_LABELS: Record = { related: 'Related to', blocks: 'Blocking', - duplicates: 'Duplicates', + duplicate: 'Duplicates', blocked: 'Blocked by', duplicated: 'Duplicated by' }; @@ -11,7 +11,7 @@ export const RELATIONSHIP_LABELS: Record = { export const RELATIONSHIP_OPTIONS = [ {value: 'related', label: RELATIONSHIP_LABELS.related}, {value: 'blocks', label: RELATIONSHIP_LABELS.blocks}, - {value: 'duplicates', label: RELATIONSHIP_LABELS.duplicates}, + {value: 'duplicate', label: RELATIONSHIP_LABELS.duplicate}, {value: 'blocked', label: RELATIONSHIP_LABELS.blocked}, {value: 'duplicated', label: RELATIONSHIP_LABELS.duplicated} ] as const; \ No newline at end of file