diff --git a/app/routes/mod-queue.tsx b/app/routes/mod-queue.tsx
index 39333cf..9045f0c 100644
--- a/app/routes/mod-queue.tsx
+++ b/app/routes/mod-queue.tsx
@@ -9,6 +9,7 @@ import {
} from "@chakra-ui/react";
import { useState } from "react";
import AppealCard from "../../components/AppealCard.js";
+import ReportCard from "../../components/ReportCard.js";
import { useLoaderData } from "@remix-run/react";
export async function loader({ context }: { context: RequestContext }) {
@@ -114,19 +115,12 @@ export default function () {
for (const entry of entryData) {
switch (queue_type) {
case "appeal":
- newEntries.push(
-
- );
+ newEntries.push();
+
+ break;
+
+ case "report":
+ newEntries.push();
}
}
diff --git a/components/AppealCard.tsx b/components/AppealCard.tsx
index db071f5..efd0f50 100644
--- a/components/AppealCard.tsx
+++ b/components/AppealCard.tsx
@@ -12,15 +12,7 @@ import {
} from "@chakra-ui/react";
import { useEffect, useState } from "react";
-export default function (props: {
- ban_reason: string;
- createdAt: number;
- discriminator: string;
- id: string;
- learned: string;
- reason_for_unban: string;
- username: string;
-}) {
+export default function (props: AppealCardProps) {
const [dateString, setDateString] = useState(
new Date(props.createdAt).toUTCString()
);
diff --git a/components/ReportCard.tsx b/components/ReportCard.tsx
index ff31144..0076738 100644
--- a/components/ReportCard.tsx
+++ b/components/ReportCard.tsx
@@ -13,13 +13,7 @@ import {
} from "@chakra-ui/react";
import { useState } from "react";
-export default function (props: {
- attachment: string;
- attachment_loading?: boolean;
- reporter?: { [k: string]: any };
- target_ids: number[];
- target_usernames: string[];
-}) {
+export default function (props: ReportCardProps) {
const targetMap: { [k: number]: string } = {};
const [attachmentReady, setAttachmentReady] = useState(
!props.attachment_loading
diff --git a/index.d.ts b/index.d.ts
index 2f7c1b0..4d4eb1b 100644
--- a/index.d.ts
+++ b/index.d.ts
@@ -23,6 +23,24 @@ declare global {
extractCriticalToChunks: (html: string) => EmotionCriticalToChunks;
}
+ interface AppealCardProps {
+ ban_reason: string;
+ createdAt: number;
+ discriminator: string;
+ id: string;
+ learned: string;
+ reason_for_unban: string;
+ username: string;
+ }
+
+ interface ReportCardProps {
+ attachment: string;
+ attachment_loading?: boolean;
+ reporter?: { [k: string]: any };
+ target_ids: number[];
+ target_usernames: string[];
+ }
+
export function createEmotionServer(cache: EmotionCache): EmotionServer;
}