import React , { Fragment } from 'react' ; import { PluginElementsProps , PluginElementData } from '@burner-wallet/types' ; import { useBurner } from '../BurnerProvider' ; type ModifiedPluginElementsProps = Pick < PluginElementsProps , 'position' > ; const PluginElements = ( { position , ... props } ) => { const { pluginData } = useBurner ( ) ; const elements = pluginData . elements [ position ] ; if ( ! elements || elements . length === 0 ) { return null ; } return ( < Fragment > { elements . map ( ( { Component , plugin } , i ) => ( < Component key = { i } plugin = { plugin } { ... props } / > ) ) } < /Fragment>); } ; export default PluginElements ;