import * as React from 'react' ; import * as ReactDOM from 'react-dom' ; import { IHeaderProps , Header } from './Header' ; import { IFooterProps , Footer } from './Footer' ; import IHeaderFooterData from '../model/IHeaderFooterData' ; import { languageManager } from '../../languageManager' ; export default class ComponentManager { public static render ( headerDomElement , footerDomElement , data ) { const strings = languageManager . GetStrings ( ) ; if ( headerDomElement ) { const reactElt = React . createElement ( Header , { links : data . headerLinks } ) ; ReactDOM . render ( reactElt , headerDomElement ) ; } if ( footerDomElement ) { const reactElt = React . createElement ( Footer , { message : strings . FooterMessage , links : data . footerLinks } ) ; ReactDOM . render ( reactElt , footerDomElement ) ; } } }