diff --git a/src/App.js b/src/components/App.js similarity index 67% rename from src/App.js rename to src/components/App.js index 9920e82..b66302d 100644 --- a/src/App.js +++ b/src/components/App.js @@ -1,9 +1,9 @@ import React from 'react'; import { BrowserRouter as Router, Route } from 'react-router-dom'; -import Home from './components/Home'; -import Header from './components/Header'; +import Home from './Home'; +import Header from './Header'; -const App = () => { +export default () => { return (
@@ -13,5 +13,3 @@ const App = () => {
); }; - -export default App; diff --git a/src/components/Channel/ChannelEntry.js b/src/components/Channel/ChannelEntry.js index 8d11c67..e79bc61 100644 --- a/src/components/Channel/ChannelEntry.js +++ b/src/components/Channel/ChannelEntry.js @@ -1,7 +1,7 @@ import React from 'react'; import ChannelList from './ChannelList'; -const ChannelEntry = props => { +export default props => { const { clients, channel } = props; const joined = []; if (channel.totalClients > 0) { @@ -26,5 +26,3 @@ const ChannelEntry = props => { ); }; - -export default ChannelEntry; diff --git a/src/components/Channel/ChannelList.js b/src/components/Channel/ChannelList.js index 1ceed80..cfb834c 100644 --- a/src/components/Channel/ChannelList.js +++ b/src/components/Channel/ChannelList.js @@ -2,7 +2,7 @@ import React from 'react'; import ChannelEntry from './ChannelEntry'; -const ChannelList = ({ channels, clients }) => { +export default ({ channels, clients }) => { return ( ); }; - -export default ChannelList; diff --git a/src/components/Channel/ChannelView.js b/src/components/Channel/ChannelView.js index 8000ab3..f8aff0c 100644 --- a/src/components/Channel/ChannelView.js +++ b/src/components/Channel/ChannelView.js @@ -1,6 +1,6 @@ import React from 'react'; -const ChannelView = ({ channel }) => { +export default ({ channel }) => { return (

{channel.name}

@@ -24,5 +24,3 @@ const ChannelView = ({ channel }) => {
); }; - -export default ChannelView; diff --git a/src/components/Header.js b/src/components/Header.js index c15214b..d32686f 100644 --- a/src/components/Header.js +++ b/src/components/Header.js @@ -1,7 +1,5 @@ import React from 'react'; -const Header = () => { +export default () => { return
Cliffbreak.de
; }; - -export default Header; diff --git a/src/components/Home.js b/src/components/Home.js index fe8d963..42a4122 100644 --- a/src/components/Home.js +++ b/src/components/Home.js @@ -1,12 +1,10 @@ -import React, { Component } from 'react'; +import React from 'react'; import Channels from './Channel/Channels'; -export default class Home extends Component { - render() { - return ( -
- -
- ); - } -} +export default () => { + return ( +
+ +
+ ); +}; diff --git a/src/index.js b/src/index.js index dd42248..ca95c8b 100644 --- a/src/index.js +++ b/src/index.js @@ -1,6 +1,6 @@ import React from 'react'; import ReactDOM from 'react-dom'; -import App from './App'; +import App from './components/App'; import './index.scss'; import * as serviceWorker from './serviceWorker';