"use client"; import Image from "next/image"; import { redirect } from "next/navigation"; import { useState } from "react"; import { Mii, ReportReason } from "@prisma/client"; import ReasonSelector from "./reason-selector"; import SubmitButton from "../submit-button"; import LikeButton from "../like-button"; interface Props { mii: Mii; likes: number; } export default function ReportMiiForm({ mii, likes }: Props) { const [reason, setReason] = useState(); const [notes, setNotes] = useState(); const [error, setError] = useState(undefined); const handleSubmit = async () => { const response = await fetch(`/api/report`, { method: "POST", body: JSON.stringify({ id: mii.id, type: "mii", reason: reason?.toLowerCase(), notes }), }); const { error } = await response.json(); if (!response.ok) { setError(error); return; } redirect(`/`); }; return (

Report a Mii

If you encounter a rule-breaking Mii, please report it here


mii image

{mii.name}