activity-stream.jsx 837 B

12345678910111213141516171819202122
  1. import {actionCreators as ac, actionTypes as at} from "common/Actions.jsm";
  2. import {Base} from "content-src/components/Base/Base";
  3. import {DetectUserSessionStart} from "content-src/lib/detect-user-session-start";
  4. import {initStore} from "content-src/lib/init-store";
  5. import {Provider} from "react-redux";
  6. import React from "react";
  7. import ReactDOM from "react-dom";
  8. import {reducers} from "common/Reducers.jsm";
  9. const store = initStore(reducers);
  10. new DetectUserSessionStart(store).sendEventOrAddListener();
  11. store.dispatch(ac.AlsoToMain({type: at.NEW_TAB_STATE_REQUEST}));
  12. ReactDOM.hydrate(<Provider store={store}>
  13. <Base
  14. isFirstrun={global.document.location.href === "about:welcome"}
  15. locale={global.document.documentElement.lang}
  16. strings={global.gActivityStreamStrings} />
  17. </Provider>, document.getElementById("root"));