App.tsx 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. const App = () => {
  7. return (
  8. <StyledMain>
  9. <GlobalStyle />
  10. <PorterErrorBoundary errorBoundaryLocation="globalErrorBoundary">
  11. <BrowserRouter>
  12. <MainWrapper />
  13. </BrowserRouter>
  14. </PorterErrorBoundary>
  15. </StyledMain>
  16. );
  17. };
  18. export default App;
  19. const GlobalStyle = createGlobalStyle`
  20. * {
  21. box-sizing: border-box;
  22. font-family: 'Work Sans', sans-serif;
  23. color-scheme: dark;
  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. `;