File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
app-layout/visual-refresh-toolbar Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -41,9 +41,11 @@ export function createAppLayoutPart({ Component }: { Component: React.JSXElement
41
41
const ref = useRef < HTMLDivElement > ( null ) ;
42
42
43
43
useEffect ( ( ) => {
44
- setTimeout ( ( ) => {
44
+ const timeoutId = setTimeout ( ( ) => {
45
45
setMount ( true ) ;
46
- } , 500 ) ;
46
+ } , 1000 ) ;
47
+
48
+ return ( ) => clearTimeout ( timeoutId ) ;
47
49
} , [ ] ) ;
48
50
49
51
if ( ! enableDelayedComponents || ( mount && enableDelayedComponents ) ) {
Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ export const InternalBreadcrumbGroup = createWidgetizedBreadcrumbGroup(
9
9
) ;
10
10
11
11
const enableDelayedComponents = false ;
12
- const enableSyncComponents = true ;
13
12
14
13
// eslint-disable-next-line @typescript-eslint/no-explicit-any
15
14
export function createAppLayoutPart ( { Component } : { Component : React . JSXElementConstructor < any > } ) {
@@ -19,12 +18,14 @@ export function createAppLayoutPart({ Component }: { Component: React.JSXElement
19
18
const ref = useRef < HTMLDivElement > ( null ) ;
20
19
21
20
useEffect ( ( ) => {
22
- setTimeout ( ( ) => {
21
+ const timeoutId = setTimeout ( ( ) => {
23
22
setMount ( true ) ;
24
23
} , 1000 ) ;
24
+
25
+ return ( ) => clearTimeout ( timeoutId ) ;
25
26
} , [ ] ) ;
26
27
27
- if ( enableSyncComponents || ( mount && enableDelayedComponents ) ) {
28
+ if ( ! enableDelayedComponents || ( mount && enableDelayedComponents ) ) {
28
29
return < Component { ...props } /> ;
29
30
}
30
31
You can’t perform that action at this time.
0 commit comments