Move card types to declaration file
This commit is contained in:
@ -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(
|
||||
<AppealCard
|
||||
{...(entry as {
|
||||
ban_reason: string;
|
||||
createdAt: number;
|
||||
discriminator: string;
|
||||
id: string;
|
||||
learned: string;
|
||||
reason_for_unban: string;
|
||||
username: string;
|
||||
})}
|
||||
/>
|
||||
);
|
||||
newEntries.push(<AppealCard {...(entry as AppealCardProps)} />);
|
||||
|
||||
break;
|
||||
|
||||
case "report":
|
||||
newEntries.push(<ReportCard {...(entry as ReportCardProps)} />);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user