From f4629540ac41eea953389005f8f3a8cacaf1ea72 Mon Sep 17 00:00:00 2001 From: Daniel O'Connell Date: Mon, 9 Dec 2024 12:42:37 +0100 Subject: [PATCH] skip duplicates --- app/routes/questions.$questionId.$.tsx | 6 +++++- app/server-utils/stampy.ts | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/routes/questions.$questionId.$.tsx b/app/routes/questions.$questionId.$.tsx index 29dae0db..2af7bc50 100644 --- a/app/routes/questions.$questionId.$.tsx +++ b/app/routes/questions.$questionId.$.tsx @@ -179,7 +179,11 @@ export default function RenderArticle() { return ( ) - } else if (resolvedQuestion.data.status === QuestionStatus.TO_DELETE) { + } else if ( + [QuestionStatus.TO_DELETE, QuestionStatus.DUPLICATE].includes( + resolvedQuestion.data.status ?? QuestionStatus.UNKNOWN + ) + ) { return } else { return ( diff --git a/app/server-utils/stampy.ts b/app/server-utils/stampy.ts index 1bfa8c45..06229217 100644 --- a/app/server-utils/stampy.ts +++ b/app/server-utils/stampy.ts @@ -31,6 +31,7 @@ export enum QuestionStatus { WITHDRAWN = 'Withdrawn', SKETCH = 'Bulletpoint sketch', TO_DELETE = 'Marked for deletion', + DUPLICATE = 'Duplicate', UNCATEGORIZED = 'Uncategorized', NOT_STARTED = 'Not started', IN_PROGRESS = 'In progress',