diff --git a/app/routes/hammer.tsx b/app/routes/hammer.tsx index 76b4b04..e4632c6 100644 --- a/app/routes/hammer.tsx +++ b/app/routes/hammer.tsx @@ -1,6 +1,4 @@ import { - Alert, - AlertIcon, Box, Button, Card, @@ -63,7 +61,6 @@ export default function () { const [avatarUrl, setAvatarUrl] = useState(""); const [ticketLink, setTicketLink] = useState(""); const [history, setHistory] = useState([] as ReactElement[]); - const [hasResults, setHasResults] = useState(true); const [loading, setLoading] = useState(false); const { isOpen, onClose, onOpen } = useDisclosure(); const toast = useToast(); @@ -111,25 +108,13 @@ export default function () { }; } = await historyResp.json(); - if (!history.length) { - setLoading(false); - setHasResults(false); - setStatus(""); - return toast({ - title: "Nothing Found", - description: "This user doesn't have any moderation history.", - status: "info", - }); - } - - setHasResults(true); - const cardList = []; - setAvatarUrl(user.avatar ?? "https://i.hep.gg/floppa"); setUid(user.id.toString()); setUsername(user.name); setStatus(user.current_status); + const cardList = []; + for (const entry of history) { const url = entry.entity.properties.evidence.stringValue; const isUrl = () => { @@ -287,13 +272,6 @@ export default function () { User Lookup Look up a user's punishment history here. - {!hasResults ? ( - - - No information was found for this user. Perhaps you misspelt their - name? - - ) : null}