index.tsx 668 B

1234567891011121314151617181920212223242526272829
  1. import React from "react";
  2. import ReactDOM from "react-dom";
  3. import { TopErrorBoundary } from "./components/TopErrorBoundary";
  4. import { IsMobileProvider } from "./is-mobile";
  5. import { App } from "./components/App";
  6. import "./styles.scss";
  7. // Block pinch-zooming on iOS outside of the content area
  8. document.addEventListener(
  9. "touchmove",
  10. function(event) {
  11. // @ts-ignore
  12. if (event.scale !== 1) {
  13. event.preventDefault();
  14. }
  15. },
  16. { passive: false },
  17. );
  18. const rootElement = document.getElementById("root");
  19. ReactDOM.render(
  20. <TopErrorBoundary>
  21. <IsMobileProvider>
  22. <App />
  23. </IsMobileProvider>
  24. </TopErrorBoundary>,
  25. rootElement,
  26. );