App.tsx 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. import React, { Component } from "react";
  2. import { BrowserRouter } from "react-router-dom";
  3. import PorterErrorBoundary from "shared/error_handling/PorterErrorBoundary";
  4. import styled, { createGlobalStyle } from "styled-components";
  5. import MainWrapper from "./main/MainWrapper";
  6. export default class App extends Component {
  7. render() {
  8. return (
  9. <StyledMain>
  10. <GlobalStyle />
  11. <PorterErrorBoundary errorBoundaryLocation="globalErrorBoundary">
  12. <BrowserRouter>
  13. <MainWrapper />
  14. </BrowserRouter>
  15. </PorterErrorBoundary>
  16. </StyledMain>
  17. );
  18. }
  19. }
  20. const GlobalStyle = createGlobalStyle`
  21. * {
  22. box-sizing: border-box;
  23. font-family: 'Work Sans', sans-serif;
  24. }
  25. body {
  26. background: #202227;
  27. overscroll-behavior-x: none;
  28. }
  29. a {
  30. color: #949eff;
  31. text-decoration: none;
  32. }
  33. img {
  34. max-width: 100%;
  35. }
  36. `;
  37. const StyledMain = styled.div`
  38. height: 100vh;
  39. width: 100vw;
  40. position: fixed;
  41. top: 0;
  42. left: 0;
  43. background: #202227;
  44. color: white;
  45. `;