UNPKG

playball

Version:

Watch MLB games from the comfort of your terminal

23 lines (22 loc) 868 B
import React from 'react'; import { Provider } from "react-redux/lib/alternate-renderers.js"; import raf from 'raf'; import screen from "./screen.js"; import store from "./store/index.js"; import log from "./logger.js"; import App from "./components/App.js"; export default async function startInterface(options) { raf.polyfill(); process.on('uncaughtException', function (error) { log.error('UNCAUGHT EXCEPTION\n' + JSON.stringify(error) + '\n' + error.stack); }); // Must be imported dynamically because the import seems to have // side effects that block other CLI commands from exiting const reactBlessed = await import('react-blessed'); reactBlessed.render( /*#__PURE__*/React.createElement(Provider, { store: store }, /*#__PURE__*/React.createElement(App, { replayId: options.replay, defaultDate: options.date })), screen()); }