Skip to content

Commit 357d3a0

Browse files
committed
Feature(frontend): add dynamic import (code split) support
1 parent a31e507 commit 357d3a0

File tree

22 files changed

+219
-49
lines changed

22 files changed

+219
-49
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.contentLoader {
2+
margin: auto;
3+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import * as React from 'react';
2+
import ContentLoader, { ContentLoaderProps } from 'react-content-loader';
3+
4+
const styles = require('./contentLoader.scss');
5+
6+
export default (props: ContentLoaderProps) => (
7+
<div className={styles.contentLoader}>
8+
<ContentLoader
9+
height={400}
10+
width={400}
11+
speed={2}
12+
primaryColor='#f3f3f3'
13+
secondaryColor='#ecebeb'
14+
{...props}
15+
>
16+
<rect x='160.5' y='11' rx='4' ry='4' width='76.63000000000001' height='15.093' />
17+
<rect x='60.5' y='35.05' rx='1' ry='1' width='275.40000000000003' height='151.35999999999999' />
18+
</ContentLoader>
19+
</div>
20+
);
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export {default} from './contentLoader';
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.contentLoader {
2+
max-width: 50%;
3+
margin: auto;
4+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import * as React from 'react';
2+
import ContentLoader, { ContentLoaderProps } from 'react-content-loader';
3+
4+
const styles = require('./contentLoader.scss');
5+
6+
export default (props: ContentLoaderProps) => (
7+
<div className={styles.contentLoader}>
8+
<ContentLoader
9+
height={326}
10+
width={400}
11+
speed={2}
12+
primaryColor='#f3f3f3'
13+
secondaryColor='#ecebeb'
14+
{...props}
15+
>
16+
<rect x='93' y='24' rx='4' ry='4' width='210' height='30.68' />
17+
<rect x='36' y='92.05' rx='4' ry='4' width='330.24' height='193.63' />
18+
</ContentLoader>
19+
</div>
20+
);
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export {default} from './contentLoader';

frontend/src/pages/NotFoundPage/notFoundPage.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
margin: auto;
44
padding: 60px;
55
max-width: 90%;
6+
object-fit: cover;
67
}

frontend/src/pages/NotFoundPage/notFoundPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default class NotFoundPage extends React.Component<{}, INotFoundPageState
2929
return (
3030
<div>
3131
<h1 className='page-title'>404 Not Found</h1>
32-
<img className={styles['not-found-img']} src={require('./assets/images/' + notFoundImageList[this.state.imageId])} alt='not-found-img' />
32+
<img className={styles['not-found-img']} src={require('./assets/images/' + notFoundImageList[this.state.imageId])} alt='not-found-img' height='550px' width='750px' />
3333
</div>
3434
);
3535
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.contentLoader {
2+
margin: auto;
3+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import * as React from 'react';
2+
import ContentLoader, { ContentLoaderProps } from 'react-content-loader';
3+
4+
const styles = require('./contentLoader.scss');
5+
6+
export default (props: ContentLoaderProps) => (
7+
<div className={styles.contentLoader}>
8+
<ContentLoader
9+
height={500}
10+
width={400}
11+
speed={2}
12+
primaryColor='#f3f3f3'
13+
secondaryColor='#ecebeb'
14+
{...props}
15+
>
16+
<rect x='160' y='12' rx='4' ry='4' width='80' height='15.6468' />
17+
<rect x='0' y='41.05' rx='4' ry='4' width='399.5904' height='112.7321' />
18+
<rect x='49' y='163.05' rx='4' ry='4' width='299' height='126.9' />
19+
</ContentLoader>
20+
</div>
21+
);

0 commit comments

Comments
 (0)