File tree Expand file tree Collapse file tree 4 files changed +29
-31
lines changed Expand file tree Collapse file tree 4 files changed +29
-31
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ class DemoInfo extends React.Component {
10
10
) => {
11
11
return (
12
12
< div >
13
- < p className = "flex lh-title mb3" >
13
+ < div className = "flex lh-title mb3" >
14
14
< div className = "mr4" >
15
15
< div className = "fw6" > First Name</ div >
16
16
< div > { firstName } </ div >
@@ -25,7 +25,7 @@ class DemoInfo extends React.Component {
25
25
< div > { dateOfBirth } </ div >
26
26
</ div >
27
27
) }
28
- </ p >
28
+ </ div >
29
29
{ description . map ( ( line : string , idx : number ) => (
30
30
< p key = { idx } className = "pb2" >
31
31
{ line }
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ exports[`renders correctly 1`] = `
66
66
className = " mw7 mb4"
67
67
>
68
68
<div >
69
- <p
69
+ <div
70
70
className = " flex lh-title mb3"
71
71
>
72
72
<div
@@ -93,7 +93,7 @@ exports[`renders correctly 1`] = `
93
93
Conviction
94
94
</div >
95
95
</div >
96
- </p >
96
+ </div >
97
97
<p
98
98
className = " pb2"
99
99
>
@@ -112,7 +112,7 @@ exports[`renders correctly 1`] = `
112
112
className = " mw7 mb4"
113
113
>
114
114
<div >
115
- <p
115
+ <div
116
116
className = " flex lh-title mb3"
117
117
>
118
118
<div
@@ -139,7 +139,7 @@ exports[`renders correctly 1`] = `
139
139
Charges
140
140
</div >
141
141
</div >
142
- </p >
142
+ </div >
143
143
<p
144
144
className = " pb2"
145
145
>
@@ -163,7 +163,7 @@ exports[`renders correctly 1`] = `
163
163
className = " mw7 mb4"
164
164
>
165
165
<div >
166
- <p
166
+ <div
167
167
className = " flex lh-title mb3"
168
168
>
169
169
<div
@@ -190,7 +190,7 @@ exports[`renders correctly 1`] = `
190
190
Common
191
191
</div >
192
192
</div >
193
- </p >
193
+ </div >
194
194
<p
195
195
className = " pb2"
196
196
>
@@ -214,7 +214,7 @@ exports[`renders correctly 1`] = `
214
214
className = " mw7 mb4"
215
215
>
216
216
<div >
217
- <p
217
+ <div
218
218
className = " flex lh-title mb3"
219
219
>
220
220
<div
@@ -251,7 +251,7 @@ exports[`renders correctly 1`] = `
251
251
1/1/1970
252
252
</div >
253
253
</div >
254
- </p >
254
+ </div >
255
255
<p
256
256
className = " pb2"
257
257
>
@@ -270,7 +270,7 @@ exports[`renders correctly 1`] = `
270
270
className = " mw7 mb4"
271
271
>
272
272
<div >
273
- <p
273
+ <div
274
274
className = " flex lh-title mb3"
275
275
>
276
276
<div
@@ -307,7 +307,7 @@ exports[`renders correctly 1`] = `
307
307
2/2/1985
308
308
</div >
309
309
</div >
310
- </p >
310
+ </div >
311
311
<p
312
312
className = " pb2"
313
313
>
Original file line number Diff line number Diff line change 1
1
// These imports are all defaults from create-react-app.
2
- import React from "react" ;
3
- import ReactDOM from "react-dom" ;
4
- import App from "./components/App" ;
5
- import * as serviceWorker from "./serviceWorker" ;
6
- import "./index.scss" ;
7
-
8
- // The following is based on the example code at
9
- // https://react-redux.js.org/introduction/quick-start
2
+ import { createRoot } from "react-dom/client" ;
10
3
import { Provider } from "react-redux" ;
4
+ import { BrowserRouter } from "react-router-dom" ;
5
+
6
+ import * as serviceWorker from "./serviceWorker" ;
11
7
import store from "./redux/store" ;
8
+ import App from "./components/App" ;
9
+ import "./index.scss" ;
12
10
13
- const rootElement = document . getElementById ( "root" ) ;
14
- ReactDOM . render (
11
+ const container = document . getElementById ( "root" ) ;
12
+ const root = createRoot ( container ! ) ;
13
+ root . render (
15
14
< Provider store = { store } >
16
- < App />
17
- </ Provider > ,
18
- rootElement
15
+ < BrowserRouter >
16
+ < App />
17
+ </ BrowserRouter >
18
+ </ Provider >
19
19
) ;
20
20
21
21
// Service Workers are intentionally turned off; they were causing
Original file line number Diff line number Diff line change 1
- // See the following guides for an explanation:
2
1
// https://redux-starter-kit.js.org/usage/usage-guide
3
2
// https://redux.js.org/recipes/usage-with-typescript
4
- import { configureStore , getDefaultMiddleware } from "@reduxjs/toolkit" ;
5
- import { combineReducers } from "redux" ;
6
3
7
- // Reducers:
4
+ import { configureStore } from "@reduxjs/toolkit" ;
5
+ import { combineReducers } from "redux" ;
8
6
import { searchReducer } from "./search/reducer" ;
9
7
10
8
const rootReducer = combineReducers ( {
@@ -13,9 +11,9 @@ const rootReducer = combineReducers({
13
11
14
12
const store = configureStore ( {
15
13
reducer : rootReducer ,
16
- middleware : [ ...getDefaultMiddleware ( ) ] ,
17
14
} ) ;
18
15
19
16
export type AppState = ReturnType < typeof rootReducer > ;
20
-
17
+ export type RootState = ReturnType < typeof store . getState > ;
18
+ export type AppDispatch = typeof store . dispatch ;
21
19
export default store ;
You can’t perform that action at this time.
0 commit comments