import React from 'react'; import MessageBox from '@/components/elements/MessageBox'; import { useStoreState } from '@/state'; type Props = Readonly<{ byKey?: string; className?: string; }>; const FlashMessageRender = ({ byKey, className }: Props) => { const flashes = useStoreState((state) => state.flashes.items.filter((flash) => (byKey ? flash.key === byKey : true)) ); return flashes.length ? (