All files / app/features/auth/jail ModNoteSection.tsx

0% Statements 0/7
100% Branches 0/0
0% Functions 0/2
0% Lines 0/7

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27                                                     
import { Typography } from "@mui/material";
import { useTranslation } from "i18n";
import { AUTH, GLOBAL } from "i18n/namespaces";
import { ModNote } from "proto/account_pb";
 
import ModNoteCard from "./ModNoteCard";
 
interface ModNoteSectionProps {
  pendingModNotes: Array<ModNote.AsObject>;
  updateJailed: () => void;
  className?: string;
}
 
export default function ModNoteSection({ pendingModNotes, updateJailed, className }: ModNoteSectionProps) {
  const { t } = useTranslation([AUTH, GLOBAL]);
 
  return (
    <div className={className}>
      <Typography variant="h2">{t("auth:jail.mod_note_section.title")}</Typography>
      <Typography variant="body1">{t("auth:jail.mod_note_section.description")}</Typography>
      {pendingModNotes.map((note) => (
        <ModNoteCard key={note.noteId} note={note} updateJailed={updateJailed} />
      ))}
    </div>
  );
}