import { useState, useEffect } from 'react' import { MidtermsMaps } from './midterms-maps' export function StaticReactEmbed(props: { embedName: string }) { const { embedName } = props const [embed, setEmbed] = useState(null) useEffect(() => { const governorMidtermsMap = const senateMidtermsMap = if (embedName === 'governor-midterms-map') { setEmbed(governorMidtermsMap) } else if (embedName === 'senate-midterms-map') { setEmbed(senateMidtermsMap) } }, [embedName, setEmbed]) return
{embed}
}