Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/RelationshipItem/RelationshipItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/AddRelationshipPage/AddRelationshipPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function AddRelationshipPage() {
};
};

if (selectedType === 'duplicates') {
if (selectedType === 'duplicate') {
input.type = 'duplicate';
};

Expand Down
6 changes: 3 additions & 3 deletions src/types/relationships.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
export type RelationshipType = 'related' | 'blocks' | 'duplicates' | 'blocked' | 'duplicated';
export type RelationshipType = 'related' | 'blocks' | 'duplicate' | 'blocked' | 'duplicated';

export const RELATIONSHIP_LABELS: Record<RelationshipType, string> = {
related: 'Related to',
blocks: 'Blocking',
duplicates: 'Duplicates',
duplicate: 'Duplicates',
blocked: 'Blocked by',
duplicated: 'Duplicated by'
};

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;
Loading