import React from 'react'; import { createPortal } from 'react-dom'; import invariant from 'tiny-invariant'; export function FlashMessage({ message, level, sticky, fixed }: { message: string; level: string; sticky?: boolean; fixed?: boolean; }) { const element = document.getElementById('flash_messages'); invariant(element, 'Flash messages root element not found'); return createPortal(