File tree Expand file tree Collapse file tree 3 files changed +8
-9
lines changed Expand file tree Collapse file tree 3 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ function Preview<T>({
75
75
[ styles . hidden ] : hiddenResult ,
76
76
} ) }
77
77
>
78
- < Boundary fallback = { < LivePreviewLoader /> } >
78
+ < Boundary fallback = { null } >
79
79
< PreviewBlockLazy />
80
80
</ Boundary >
81
81
</ div >
@@ -86,9 +86,6 @@ function Preview<T>({
86
86
}
87
87
export default memo ( Preview ) ;
88
88
89
- function LivePreviewLoader ( ) {
90
- return < div > Loading...</ div > ;
91
- }
92
89
const PreviewBlockLazy = lazy (
93
90
( ) =>
94
91
import (
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
import { LiveError , LivePreview } from 'react-live' ;
3
3
4
+ import Boundary from './Boundary' ;
4
5
import styles from './styles.module.css' ;
5
6
6
7
export default function PreviewBlock ( ) {
7
8
return (
8
9
< >
9
- < LivePreview />
10
+ < Boundary fallback = { < LivePreviewLoader /> } >
11
+ < LivePreview />
12
+ </ Boundary >
10
13
< LiveError className = { styles . playgroundError } />
11
14
</ >
12
15
) ;
13
16
}
17
+ function LivePreviewLoader ( ) {
18
+ return < div > Loading...</ div > ;
19
+ }
Original file line number Diff line number Diff line change @@ -90,8 +90,6 @@ const entities = {
90
90
91
91
export const getInitialInterceptorData = ( ) => ( { entities : { } } ) ;
92
92
93
- const delay = 150 ;
94
-
95
93
export const postFixtures = [
96
94
{
97
95
endpoint : PostResource . get ,
@@ -102,7 +100,6 @@ export const postFixtures = [
102
100
...entities [ id ] ,
103
101
} ;
104
102
} ,
105
- delay,
106
103
} ,
107
104
{
108
105
endpoint : PostResource . getList ,
@@ -114,7 +111,6 @@ export const postFixtures = [
114
111
}
115
112
return Object . values ( entities ) ;
116
113
} ,
117
- delay,
118
114
} ,
119
115
{
120
116
endpoint : PostResource . vote ,
You can’t perform that action at this time.
0 commit comments