import { AnimatePresence, motion } from 'framer-motion' import { CardContent, Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from 'ui' import { Admonition } from 'ui-patterns' import { Markdown } from '@/components/interfaces/Markdown' import { ValidateSpamResponse } from '@/data/auth/validate-spam-mutation' interface SpamValidationProps { spamRules?: ValidateSpamResponse['rules'] } // [Joshen] According to API, we label as a spam risk as long as there are spam // rules identified with scores above 0. Scores are irrelevant in our context and // are hence not visualized in the UI export const SpamValidation = ({ spamRules = [] }: SpamValidationProps) => { const rules = spamRules.filter((rule) => rule.score >= 0) return ( {rules.length > 0 && (
Warning Description {rules.map((rule) => ( {rule.name} {rule.desc} ))}
)}
) }