Skip to content

Commit

Permalink
created room skeleton, reorganized component file structure
Browse files Browse the repository at this point in the history
  • Loading branch information
korykilpatrick committed Nov 15, 2017
1 parent 8451faa commit 633a132
Show file tree
Hide file tree
Showing 14 changed files with 99 additions and 37 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ class App extends React.Component {
}
}

ReactDOM.render(<App />, document.getElementById('root'));
// ReactDOM.render(<App />, document.getElementById('homepage'));
13 changes: 13 additions & 0 deletions client/src/components/Room/Playlist.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from 'react';
import PropTypes from 'prop-types';

const Playlist = () => (
<div>
<p>Playlist</p>
</div>
);

Playlist.propTypes = {
};

export default Playlist;
29 changes: 29 additions & 0 deletions client/src/components/Room/RoomView.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import React from 'react';
import ReactDOM from 'react-dom';
import VideoPlayer from './VideoPlayer.jsx';
import Playlist from './Playlist.jsx';
import Search from './Search.jsx';
import VideoDescription from './VideoDescription.jsx';

class RoomView extends React.Component {
constructor(props) {
super(props);
this.state = {
video: 'insert current video',
};
}

render() {
return (
<div>
<h3>Room</h3>
<VideoPlayer video={this.state.video} />
<VideoDescription />
<Playlist />
<Search />
</div>
);
}
}

ReactDOM.render(<RoomView />, document.getElementById('room'));
15 changes: 15 additions & 0 deletions client/src/components/Room/Search.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from 'react';
import PropTypes from 'prop-types';
import SearchResults from './SearchResults.jsx';

const Search = () => (
<div>
<p>Search</p>
<SearchResults />
</div>
);

Search.propTypes = {
};

export default Search;
11 changes: 11 additions & 0 deletions client/src/components/Room/SearchResults.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';
import SearchResultsEntry from './SearchResultsEntry.jsx';

const SearchResults = () => (
<div>
<p>SearchResults</p>
<SearchResultsEntry />
</div>
);

export default SearchResults;
9 changes: 9 additions & 0 deletions client/src/components/Room/SearchResultsEntry.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react';

const SearchResultsEntry = () => (
<div>
<p>SearchResultsEntry</p>
</div>
);

export default SearchResultsEntry;
9 changes: 9 additions & 0 deletions client/src/components/Room/VideoDescription.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react';

const VideoDescription = () => (
<div>
<p>VideoDescription</p>
</div>
);

export default VideoDescription;
18 changes: 11 additions & 7 deletions client/src/components/Room/VideoPlayer.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import React from 'react';
import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';

let VideoPlayer = (props) => (
<div>
<p>VideoPlayer</p>
</div>
)
const VideoPlayer = ({ video }) => (
<div>
<p>{video}</p>
</div>
);

export default VideoPlayer = VideoPlayer;
VideoPlayer.propTypes = {
video: PropTypes.string.isRequired,
};

export default VideoPlayer;
28 changes: 0 additions & 28 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const DIST_DIR = path.resolve(__dirname, './client/dist');
const SRC_DIR = path.resolve(__dirname, './client/src');

module.exports = {
entry: `${SRC_DIR}/components/index.jsx`,
entry: `${SRC_DIR}/components/Room/RoomView.jsx`,
output: {
path: DIST_DIR,
filename: 'bundle.js',
Expand Down

0 comments on commit 633a132

Please sign in to comment.