File tree Expand file tree Collapse file tree 3 files changed +18
-11
lines changed
packages/app/src/app/pages/Sandbox/Editor Expand file tree Collapse file tree 3 files changed +18
-11
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,11 @@ export const SkeletonTextBlock = styled.div(
1212 animation: ${ pulse } 2s linear infinite;
1313 background: linear-gradient(
1414 90deg,
15- ${ props . theme . colors ?. sideBar . border + '40 ' } 0%,
16- ${ props . theme . colors ?. sideBar . border + '40 ' } 40%,
17- ${ props . theme . colors ?. sideBar . border + '80 ' } 50%,
18- ${ props . theme . colors ?. sideBar . border + '40 ' } 60%,
19- ${ props . theme . colors ?. sideBar . border + '40 ' } 100%
15+ ${ props . theme . colors ?. sideBar . border + '80 ' } 0%,
16+ ${ props . theme . colors ?. sideBar . border + '80 ' } 40%,
17+ ${ props . theme . colors ?. sideBar . border + 'd6 ' } 50%,
18+ ${ props . theme . colors ?. sideBar . border + '80 ' } 60%,
19+ ${ props . theme . colors ?. sideBar . border + '80 ' } 100%
2020 );
2121 background-size: 200% 200%;
2222 `
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ import {
1515 SkeletonWrapper ,
1616} from './elements' ;
1717
18- export const ContentSkeleton = ( { style, onTransitionEnd } ) => (
18+ export const ContentSkeleton = ( { style } ) => (
1919 < SkeletonWrapper style = { style } >
2020 < SkeletonExplorer >
2121 < SkeletonExplorerContents />
Original file line number Diff line number Diff line change @@ -40,12 +40,19 @@ const ContentSplit = () => {
4040 customVSCodeTheme : null ,
4141 } ) ;
4242
43- useEffect ( ( ) =>
44- reaction (
43+ useEffect ( ( ) => {
44+ let timeout ;
45+ const dispose = reaction (
4546 reactionState => reactionState . editor . hasLoadedInitialModule ,
46- ( ) => setShowSkeleton ( false )
47- )
48- ) ;
47+ ( ) => {
48+ timeout = setTimeout ( ( ) => setShowSkeleton ( false ) , 500 ) ;
49+ }
50+ ) ;
51+ return ( ) => {
52+ dispose ( ) ;
53+ clearTimeout ( timeout ) ;
54+ } ;
55+ } , [ reaction ] ) ;
4956
5057 useEffect ( ( ) => {
5158 async function loadTheme ( ) {
You can’t perform that action at this time.
0 commit comments