Skip to content

Commit 6582d95

Browse files
committed
chore(splash): isolate splash dependencies to individual components
1 parent 19d8e39 commit 6582d95

File tree

4 files changed

+23
-9
lines changed

4 files changed

+23
-9
lines changed

src/components/Cube/Cube.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
// Import External Dependencies
12
import React from 'react';
23
import PropTypes from 'prop-types';
34

5+
// Load Styling
6+
import '../Cube.scss';
7+
48
export default class Cube extends React.Component {
59
static propTypes = {
610
hover: PropTypes.bool,

src/components/Splash/Splash.jsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
1+
// Import External Dependencies
12
import React from 'react';
2-
import Interactive from 'antwar-interactive';
3+
4+
// Import Components
35
import Container from '../Container/Container';
46
import SplashViz from '../SplashViz/SplashViz';
57
import Support from '../Support/Support';
8+
9+
// Load Styling
610
import './Splash.scss';
7-
import '../SplashViz/SplashViz.scss';
8-
import '../Cube/Cube.scss';
9-
import '../TextRotater/TextRotater.scss';
1011

1112
const Splash = () => (
1213
<div className="splash">
13-
<Interactive
14-
id="src/components/SplashViz/SplashViz.jsx"
15-
component={ SplashViz } />
14+
<SplashViz />
1615

1716
<div className="splash__section splash__section--dark page__content">
1817
<Container>

src/components/SplashViz/SplashViz.jsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1+
// Import External Dependencies
12
import React from 'react';
23

4+
// Load Images
5+
import HomeSVG from './SplashVizSVG';
6+
7+
// Import Components
38
import Cube from '../Cube/Cube';
49
import TextRotator from '../TextRotater/TextRotater';
5-
import homeSVG from './SplashVizSVG';
10+
11+
// Load Styling
12+
import '../SplashViz.scss';
613

714
export default class SplashViz extends React.Component {
815

@@ -18,7 +25,7 @@ export default class SplashViz extends React.Component {
1825
<span> styles </span>
1926
</TextRotator>
2027
</h1>
21-
<div className="splash-viz__modules" dangerouslySetInnerHTML={{__html: homeSVG.body}}></div>
28+
<div className="splash-viz__modules" dangerouslySetInnerHTML={{__html: HomeSVG.body}}></div>
2229
<Cube className="splash-viz__cube" depth={ 120 } repeatDelay={ 5000 } continuous/>
2330
</section>
2431
);

src/components/TextRotater/TextRotater.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
// Import External Dependencies
12
import React from 'react';
23
import PropTypes from 'prop-types';
34

5+
// Load Styling
6+
import '../TextRotater.scss';
7+
48
export default class TextRotater extends React.PureComponent {
59
static defaultProps = {
610
delay: 0,

0 commit comments

Comments
 (0)