import React , { FunctionComponent } from "react" ; import Frame from "coral-framework/components/Frame" ; import styles from "./Media.css" ; interface Props { id : string ; url : string ; siteID : string ; } const TwitterMedia = ( { id , url , siteID } ) => { const component = encodeURIComponent ( url ) ; return ( < div className = { styles . embed } > < Frame id = { id } src = { `/api/oembed?type=twitter&url=${ component }&siteID=${ siteID }` } /> < /div>); } ; export default TwitterMedia ;