-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.jsx
81 lines (74 loc) · 1.68 KB
/
index.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/**
* dependencies
*/
import React, { Component } from "react";
import { appContext } from "context/app-context";
import Audio from "components/audio";
import AppFooterNav from "components/app-footer-nav";
import AppVersion from "components/app-version";
/**
* music
*/
import rise from "assets/music/rise.mp3";
import fantastic from "assets/music/fantastic.mp3";
import legendsNeverDie from "assets/music/legends-never-die.mp3";
import shortLegendsNeverDie from "assets/music/short-legends-never-die.mp3";
class App extends Component {
constructor(props) {
super(props);
/**
* state
*/
this.state = {
tracks: [
{
name: "Small Piece of music LND",
artist: "League of Legends",
url: shortLegendsNeverDie,
},
{
name: "Legends Never Die",
artist: "League of Legends",
url: legendsNeverDie,
},
{
name: "Rise",
artist: "League of Legends",
url: rise,
},
{
name: "Fantastic - Cinematic Sound",
artist: "AudioJungle",
url: fantastic,
},
],
};
}
/**
* React Render
*/
render() {
/**
* classNames
*/
const _root = "app";
/**
* render functions
*/
const main = () => (
<div className={_root}>
<Audio
key="audio-component"
tracks={this.state.tracks}
thread="worker"
/>
<AppFooterNav key="app-footer-nav" />
<AppVersion key="app-version" />
</div>
);
return (
<appContext.Consumer>{(context) => main(context)}</appContext.Consumer>
);
}
}
export default App;