Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix cross-type requests and duplicates
  • Loading branch information
regalijan committed Oct 19, 2023
1 parent c2b8f6f commit 19a5f65
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion app/routes/mod-queue.tsx
Expand Up @@ -175,7 +175,19 @@ export default function () {
if (!entryData.length) return;

for (const entry of entryData) {
switch (queue_type) {
let cardType = queue_type;

if (
entryData.indexOf(entry) === 0 &&
itemType &&
itemType !== queue_type
) {
cardType = itemType;
// Prevent duplicate items
} else if (entryData.indexOf(entry) === 1 && queue_type === cardType)
continue;

switch (cardType) {
case "appeal":
newEntries.push(<AppealCard {...(entry as AppealCardProps)} />);

Expand Down

0 comments on commit 19a5f65

Please sign in to comment.