File tree 5 files changed +9
-53
lines changed
5 files changed +9
-53
lines changed Original file line number Diff line number Diff line change 49
49
"react-markdown" : " 8.0.3" ,
50
50
"react-router-dom" : " 6.3.0" ,
51
51
"sourcemapped-stacktrace" : " 1.1.11" ,
52
- "swr" : " 1.2.2" ,
53
52
"tzdata" : " 1.0.30" ,
54
53
"uuid" : " 8.3.2" ,
55
54
"xstate" : " 4.32.1" ,
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import CssBaseline from "@material-ui/core/CssBaseline"
2
2
import ThemeProvider from "@material-ui/styles/ThemeProvider"
3
3
import { FC } from "react"
4
4
import { BrowserRouter as Router } from "react-router-dom"
5
- import { SWRConfig } from "swr"
6
5
import { AppRouter } from "./AppRouter"
7
6
import { ErrorBoundary } from "./components/ErrorBoundary/ErrorBoundary"
8
7
import { GlobalSnackbar } from "./components/GlobalSnackbar/GlobalSnackbar"
@@ -13,34 +12,15 @@ import { XServiceProvider } from "./xServices/StateContext"
13
12
export const App : FC = ( ) => {
14
13
return (
15
14
< Router >
16
- < SWRConfig
17
- value = { {
18
- // This code came from the SWR documentation:
19
- // https://swr.vercel.app/docs/error-handling#status-code-and-error-object
20
- fetcher : async ( url : string ) => {
21
- const res = await fetch ( url )
22
-
23
- // By default, `fetch` won't treat 4xx or 5xx response as errors.
24
- // However, we want SWR to treat these as errors - so if `res.ok` is false,
25
- // we want to throw an error to bubble that up to SWR.
26
- if ( ! res . ok ) {
27
- const err = new Error ( ( await res . json ( ) ) . error ?. message || res . statusText )
28
- throw err
29
- }
30
- return res . json ( )
31
- } ,
32
- } }
33
- >
34
- < ThemeProvider theme = { dark } >
35
- < CssBaseline />
36
- < ErrorBoundary >
37
- < XServiceProvider >
38
- < AppRouter />
39
- < GlobalSnackbar />
40
- </ XServiceProvider >
41
- </ ErrorBoundary >
42
- </ ThemeProvider >
43
- </ SWRConfig >
15
+ < ThemeProvider theme = { dark } >
16
+ < CssBaseline />
17
+ < ErrorBoundary >
18
+ < XServiceProvider >
19
+ < AppRouter />
20
+ < GlobalSnackbar />
21
+ </ XServiceProvider >
22
+ </ ErrorBoundary >
23
+ </ ThemeProvider >
44
24
</ Router >
45
25
)
46
26
}
Original file line number Diff line number Diff line change 1
1
export * from "./array"
2
- export * from "./swr"
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -13113,11 +13113,6 @@ svgo@^2.7.0:
13113
13113
picocolors "^1.0.0"
13114
13114
stable "^0.1.8"
13115
13115
13116
- swr@1.2.2:
13117
- version "1.2.2"
13118
- resolved "https://registry.yarnpkg.com/swr/-/swr-1.2.2.tgz#6cae09928d30593a7980d80f85823e57468fac5d"
13119
- integrity sha512-ky0BskS/V47GpW8d6RU7CPsr6J8cr7mQD6+do5eky3bM0IyJaoi3vO8UhvrzJaObuTlGhPl2szodeB2dUd76Xw==
13120
-
13121
13116
symbol-tree@^3.2.4:
13122
13117
version "3.2.4"
13123
13118
resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2"
You can’t perform that action at this time.
0 commit comments