File tree Expand file tree Collapse file tree 1 file changed +19
-22
lines changed Expand file tree Collapse file tree 1 file changed +19
-22
lines changed Original file line number Diff line number Diff line change @@ -28,30 +28,27 @@ Add `Calendar` to your component:
28
28
29
29
``` js
30
30
import React from ' react'
31
- import ReactDOM from ' react-dom/client'
32
31
import Calendar from ' reactjs-availability-calendar'
33
32
34
- const bookings = [
35
- {
36
- from: ' 01-08-2022' ,
37
- to: ' 01-16-2022' ,
38
- middayCheckout: true ,
39
- },
40
- {
41
- from: ' 06-25-2022' ,
42
- to: ' 07-03-2022' ,
43
- middayCheckout: false ,
44
- },
45
- ]
46
-
47
- const root = ReactDOM .createRoot (document .getElementById (' root' ) as HTMLElement )
48
- root .render (
49
- < React .StrictMode >
50
- < div className= ' demo' >
51
- < Calendar bookings= {bookings} / >
52
- < / div>
53
- < / React .StrictMode > ,
54
- )
33
+ export default function App () {
34
+ const bookings = [
35
+ {
36
+ from: ' 01-08-2022' ,
37
+ to: ' 01-16-2022' ,
38
+ middayCheckout: true ,
39
+ },
40
+ {
41
+ from: ' 06-25-2022' ,
42
+ to: ' 07-03-2022' ,
43
+ middayCheckout: false ,
44
+ },
45
+ ]
46
+
47
+ return (
48
+ < Calendar bookings= {bookings} / >
49
+ )
50
+ }
51
+
55
52
56
53
```
57
54
You can’t perform that action at this time.
0 commit comments