import React from 'react';
import { Modal } from './Modal';
import { useModal } from '../context/ModalContext';

export const ModalRenderer: React.FC = () => {
    const { modals } = useModal();

    return (
        <>
            {modals.map((modal) => (
                <Modal
                    key={modal.id}
                    {...modal}
                />
            ))}
        </>
    );
}; 