1import { useToasts } from "../lib/toast";
2
3// Toasts is the one place transient errors surface. It sits at the top of the
4// window, out of the composer's way, and is inert to the pointer.
5export default function Toasts() {
6 const toasts = useToasts();
7 return (
8 <div className="pointer-events-none fixed inset-x-0 top-3 z-50 flex flex-col items-center gap-1 px-4">
9 {toasts.map((t) => (
10 <div key={t.id} role="status" className="toast">
11 {t.text}
12 </div>
13 ))}
14 </div>
15 );
16}