import React, { useEffect } from 'react'
import MaterialInstance from './instance/materialInstance'
import { useMaterialStore } from '../../../../store/simulation/useMaterialStore';

function MaterialInstances() {
    const { materials } = useMaterialStore();

    useEffect(() => {
        // console.log('materials: ', materials);
    }, [materials])

    return (
        <>

            {materials.map((material: MaterialSchema) =>
                <MaterialInstance key={material.materialId} material={material} />
            )}

        </>
    )
}

export default MaterialInstances