You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.0 KiB

import React from "react";
import ReactDOM from "react-dom";
import { Provider } from "react-redux";
import { store } from "./state";
import "./index.css";
import App from "./App";
import * as serviceWorker from "./serviceWorker";
ReactDOM.render(
<Provider store={store}>
<App />
</Provider>,
document.getElementById("root")
);
// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();
// handles opening anchor tags in the browser outside of the app
document.addEventListener("DOMContentLoaded", function() {
document.addEventListener(
"click",
function(e) {
// only handle for a tags
if (e.target.href) {
e.preventDefault();
e.stopPropagation();
window.api.sendLinkNav(e.target.href);
return false;
}
},
true
);
});