App.tsx 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 { QueryClient, QueryClientProvider } from "@tanstack/react-query";
  6. import MainWrapper from "./main/MainWrapper";
  7. const queryClient = new QueryClient();
  8. export default class App extends Component {
  9. render() {
  10. return (
  11. <QueryClientProvider client={queryClient}>
  12. <StyledMain>
  13. <GlobalStyle />
  14. <PorterErrorBoundary errorBoundaryLocation="globalErrorBoundary">
  15. <BrowserRouter>
  16. <MainWrapper />
  17. </BrowserRouter>
  18. </PorterErrorBoundary>
  19. </StyledMain>
  20. </QueryClientProvider>
  21. );
  22. }
  23. }
  24. const GlobalStyle = createGlobalStyle`
  25. * {
  26. box-sizing: border-box;
  27. font-family: 'Work Sans', sans-serif;
  28. color-scheme: dark;
  29. }
  30. body {
  31. background: #202227;
  32. overscroll-behavior-x: none;
  33. }
  34. a {
  35. color: #949eff;
  36. text-decoration: none;
  37. }
  38. img {
  39. max-width: 100%;
  40. }
  41. `;
  42. const StyledMain = styled.div`
  43. height: 100vh;
  44. width: 100vw;
  45. position: fixed;
  46. top: 0;
  47. left: 0;
  48. background: #202227;
  49. color: white;
  50. `;