index.js 920 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import React, { Component, Fragment } from 'react';
  2. import ReactDOM from 'react-dom';
  3. import { brandingMapping, brandingObject } from './branding';
  4. import { certTemplate } from './cert';
  5. const label = 'unicraft'
  6. class Dashboard extends Component {
  7. render() {
  8. const renderHeader = () => {
  9. const BrandHeader = brandingMapping[label];
  10. return <BrandHeader />;
  11. }
  12. const renderCert = () => {
  13. const cert = certTemplate(label)
  14. console.log(cert);
  15. return cert.certLog;
  16. }
  17. console.log(Object.keys(brandingObject));
  18. return (
  19. <Fragment>
  20. <h1>Header</h1>
  21. { renderHeader() }
  22. <h1>Certificate</h1>
  23. { renderCert() }
  24. </Fragment>
  25. )
  26. }
  27. }
  28. ReactDOM.render(
  29. <Dashboard />,
  30. document.getElementById('root')
  31. );