Skip to content

Commit

Permalink
skip duplicates
Browse files Browse the repository at this point in the history
  • Loading branch information
mruwnik committed Dec 9, 2024
1 parent 59cae3c commit f462954
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/routes/questions.$questionId.$.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,11 @@ export default function RenderArticle() {
return (
<Error error={{statusText: 'Could not fetch question', status: 'emptyArticle'}} />
)
} else if (resolvedQuestion.data.status === QuestionStatus.TO_DELETE) {
} else if (
[QuestionStatus.TO_DELETE, QuestionStatus.DUPLICATE].includes(
resolvedQuestion.data.status ?? QuestionStatus.UNKNOWN
)
) {
return <Error error={{statusText: 'Deleted article', status: 'deletedArticle'}} />
} else {
return (
Expand Down
1 change: 1 addition & 0 deletions app/server-utils/stampy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit f462954

Please sign in to comment.