import { useRef, useState } from "preact/hooks"; import toast from 'react-hot-toast'; import Button from "../../miniComponents/Button"; import Input from "../../miniComponents/Input"; import { trty } from "../../treaty"; export default function SidebarStaff({ setCurrentPeopleView, currentView, setUser }) { const userIdRef = useRef(); const [punishments, setPunishments] = useState(); return ( <>

Staff

{punishments === undefined ? "No user searched." : punishments.length == 0 ? "This user has no punishments!" : punishments.map((z, i) => { return
{z.type.toUpperCase()}
ID: {z.id}
Reason: {z.reason}
Banned by: {z.staffId}
Time: {z.time}ms
Banned at: {z.at.toString()}
})} ) }