Fix cross-type requests and duplicates
This commit is contained in:
parent
c2b8f6f054
commit
19a5f65b59
@ -175,7 +175,19 @@ export default function () {
|
|||||||
if (!entryData.length) return;
|
if (!entryData.length) return;
|
||||||
|
|
||||||
for (const entry of entryData) {
|
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":
|
case "appeal":
|
||||||
newEntries.push(<AppealCard {...(entry as AppealCardProps)} />);
|
newEntries.push(<AppealCard {...(entry as AppealCardProps)} />);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user