File tree Expand file tree Collapse file tree 11 files changed +65
-32
lines changed
HomePage/components/ContentLoader
NotFoundPage/components/ContentLoader
ParallaxPage/components/ContentLoader
ReactPage/components/ContentLoader Expand file tree Collapse file tree 11 files changed +65
-32
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,15 @@ import ContentLoader from '../contentLoader';
6
6
describe ( 'ContentLoader' , ( ) => {
7
7
it ( 'should renders correctly' , ( ) => {
8
8
const renderer = ShallowRenderer . createRenderer ( ) ;
9
+ const props = {
10
+ isLoading : false ,
11
+ pastDelay : false ,
12
+ timedOut : false ,
13
+ error : null ,
14
+ retry : ( ) => { return ; } ,
15
+ } ;
9
16
const result = renderer . render (
10
- < ContentLoader /> ,
17
+ < ContentLoader { ... props } /> ,
11
18
) ;
12
19
expect ( result ) . toMatchSnapshot ( ) ;
13
20
renderer . unmount ( ) ;
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
- import ContentLoader , { ContentLoaderProps } from 'react-content-loader' ;
2
+ import ContentLoader from 'react-content-loader' ;
3
+ import { LoadingComponentProps } from 'react-loadable' ;
3
4
4
5
const styles = require ( './contentLoader.scss' ) ;
5
6
6
- export default ( props : ContentLoaderProps ) => (
7
+ export default ( _ : LoadingComponentProps ) => (
7
8
< div className = { styles . contentLoader } >
8
9
< ContentLoader
9
10
height = { 400 }
10
11
width = { 400 }
11
12
speed = { 2 }
12
13
primaryColor = '#f3f3f3'
13
14
secondaryColor = '#ecebeb'
14
- { ...props }
15
15
>
16
16
< rect x = '160.5' y = '11' rx = '4' ry = '4' width = '76.63000000000001' height = '15.093' />
17
17
< rect x = '60.5' y = '35.05' rx = '1' ry = '1' width = '275.40000000000003' height = '151.35999999999999' />
Original file line number Diff line number Diff line change @@ -6,8 +6,15 @@ import ContentLoader from '../contentLoader';
6
6
describe ( 'ContentLoader' , ( ) => {
7
7
it ( 'should renders correctly' , ( ) => {
8
8
const renderer = ShallowRenderer . createRenderer ( ) ;
9
+ const props = {
10
+ isLoading : false ,
11
+ pastDelay : false ,
12
+ timedOut : false ,
13
+ error : null ,
14
+ retry : ( ) => { return ; } ,
15
+ } ;
9
16
const result = renderer . render (
10
- < ContentLoader /> ,
17
+ < ContentLoader { ... props } /> ,
11
18
) ;
12
19
expect ( result ) . toMatchSnapshot ( ) ;
13
20
renderer . unmount ( ) ;
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
- import ContentLoader , { ContentLoaderProps } from 'react-content-loader' ;
2
+ import ContentLoader from 'react-content-loader' ;
3
+ import { LoadingComponentProps } from 'react-loadable' ;
3
4
4
5
const styles = require ( './contentLoader.scss' ) ;
5
6
6
- export default ( props : ContentLoaderProps ) => (
7
+ export default ( _ : LoadingComponentProps ) => (
7
8
< div className = { styles . contentLoader } >
8
9
< ContentLoader
9
10
height = { 326 }
10
11
width = { 400 }
11
12
speed = { 2 }
12
13
primaryColor = '#f3f3f3'
13
14
secondaryColor = '#ecebeb'
14
- { ...props }
15
15
>
16
16
< rect x = '93' y = '24' rx = '4' ry = '4' width = '210' height = '30.68' />
17
17
< rect x = '36' y = '92.05' rx = '4' ry = '4' width = '330.24' height = '193.63' />
Original file line number Diff line number Diff line change @@ -6,8 +6,15 @@ import ContentLoader from '../contentLoader';
6
6
describe ( 'ContentLoader' , ( ) => {
7
7
it ( 'should renders correctly' , ( ) => {
8
8
const renderer = ShallowRenderer . createRenderer ( ) ;
9
+ const props = {
10
+ isLoading : false ,
11
+ pastDelay : false ,
12
+ timedOut : false ,
13
+ error : null ,
14
+ retry : ( ) => { return ; } ,
15
+ } ;
9
16
const result = renderer . render (
10
- < ContentLoader /> ,
17
+ < ContentLoader { ... props } /> ,
11
18
) ;
12
19
expect ( result ) . toMatchSnapshot ( ) ;
13
20
renderer . unmount ( ) ;
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
- import ContentLoader , { ContentLoaderProps } from 'react-content-loader' ;
2
+ import ContentLoader from 'react-content-loader' ;
3
+ import { LoadingComponentProps } from 'react-loadable' ;
3
4
4
5
const styles = require ( './contentLoader.scss' ) ;
5
6
6
- export default ( props : ContentLoaderProps ) => (
7
+ export default ( _ : LoadingComponentProps ) => (
7
8
< div className = { styles . contentLoader } >
8
9
< ContentLoader
9
10
height = { 500 }
10
11
width = { 400 }
11
12
speed = { 2 }
12
13
primaryColor = '#f3f3f3'
13
14
secondaryColor = '#ecebeb'
14
- { ...props }
15
15
>
16
16
< rect x = '160' y = '12' rx = '4' ry = '4' width = '80' height = '15.6468' />
17
17
< rect x = '0' y = '41.05' rx = '4' ry = '4' width = '399.5904' height = '112.7321' />
Original file line number Diff line number Diff line change @@ -6,8 +6,15 @@ import ContentLoader from '../contentLoader';
6
6
describe ( 'ContentLoader' , ( ) => {
7
7
it ( 'should renders correctly' , ( ) => {
8
8
const renderer = ShallowRenderer . createRenderer ( ) ;
9
+ const props = {
10
+ isLoading : false ,
11
+ pastDelay : false ,
12
+ timedOut : false ,
13
+ error : null ,
14
+ retry : ( ) => { return ; } ,
15
+ } ;
9
16
const result = renderer . render (
10
- < ContentLoader /> ,
17
+ < ContentLoader { ... props } /> ,
11
18
) ;
12
19
expect ( result ) . toMatchSnapshot ( ) ;
13
20
renderer . unmount ( ) ;
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
- import ContentLoader , { ContentLoaderProps } from 'react-content-loader' ;
2
+ import ContentLoader from 'react-content-loader' ;
3
+ import { LoadingComponentProps } from 'react-loadable' ;
3
4
4
5
const styles = require ( './contentLoader.scss' ) ;
5
6
6
- export default ( props : ContentLoaderProps ) => (
7
+ export default ( _ : LoadingComponentProps ) => (
7
8
< div className = { styles . contentLoader } >
8
9
< ContentLoader
9
10
height = { 400 }
10
11
width = { 400 }
11
12
speed = { 2 }
12
13
primaryColor = '#f3f3f3'
13
14
secondaryColor = '#ecebeb'
14
- { ...props }
15
15
>
16
16
< rect x = '93' y = '24' rx = '4' ry = '4' width = '210' height = '30.68' />
17
17
< rect x = '0' y = '76.05' rx = '4' ry = '4' width = '400' height = '304' />
Original file line number Diff line number Diff line change 8
8
"lib" : [
9
9
" dom" ,
10
10
" dom.iterable" ,
11
- " es2015 "
11
+ " es6 "
12
12
],
13
13
"jsx" : " react" ,
14
14
"allowSyntheticDefaultImports" : true ,
Original file line number Diff line number Diff line change @@ -36,14 +36,19 @@ export default {
36
36
test : / \. t s x ? $ / ,
37
37
use : [
38
38
{ loader : 'babel-loader' } ,
39
- // Use those two flags to speed up babel compilation
40
- // https://github.com/s-panferov/awesome-typescript-loader#differences-between-ts-loader
41
39
{
42
40
loader : 'awesome-typescript-loader' ,
43
41
options : {
42
+ silent : true ,
43
+ // Use those two flags to speed up babel compilation
44
+ // https://github.com/s-panferov/awesome-typescript-loader#differences-between-ts-loader
44
45
useBabel : true ,
45
46
useCache : true ,
46
- silent : true ,
47
+ // Workaround for at-loader not respecting "exclude" property
48
+ // https://github.com/s-panferov/awesome-typescript-loader/issues/492
49
+ reportFiles : [
50
+ 'frontend/src/**/*.{ts,tsx}' ,
51
+ ] ,
47
52
} ,
48
53
} ,
49
54
// Alternatively, we can use ts-loader
You can’t perform that action at this time.
0 commit comments