2017-04-07 07:15:22 +02:00
|
|
|
import React from 'react';
|
|
|
|
import SettingsPage from 'page/settings.js';
|
|
|
|
import HelpPage from 'page/help';
|
|
|
|
import ReportPage from 'page/report.js';
|
|
|
|
import StartPage from 'page/start.js';
|
2017-04-22 15:17:01 +02:00
|
|
|
import WalletPage from 'page/wallet';
|
2017-05-05 08:13:06 +02:00
|
|
|
import ShowPage from 'page/showPage'
|
2017-05-02 10:39:06 +02:00
|
|
|
import PublishPage from 'page/publish';
|
2017-04-23 11:56:50 +02:00
|
|
|
import DiscoverPage from 'page/discover';
|
2017-04-07 07:15:22 +02:00
|
|
|
import SplashScreen from 'component/splash.js';
|
|
|
|
import DeveloperPage from 'page/developer.js';
|
2017-05-04 05:44:08 +02:00
|
|
|
import RewardsPage from 'page/rewards.js';
|
2017-04-23 18:10:45 +02:00
|
|
|
import FileListDownloaded from 'page/fileListDownloaded'
|
|
|
|
import FileListPublished from 'page/fileListPublished'
|
2017-05-04 05:44:08 +02:00
|
|
|
import ChannelPage from 'page/channel'
|
2017-05-05 10:01:16 +02:00
|
|
|
import SearchPage from 'page/search'
|
2017-04-07 07:15:22 +02:00
|
|
|
|
|
|
|
const route = (page, routesMap) => {
|
|
|
|
const component = routesMap[page]
|
|
|
|
|
|
|
|
return component
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const Router = (props) => {
|
|
|
|
const {
|
|
|
|
currentPage,
|
|
|
|
} = props;
|
|
|
|
|
|
|
|
return route(currentPage, {
|
|
|
|
'settings': <SettingsPage {...props} />,
|
|
|
|
'help': <HelpPage {...props} />,
|
|
|
|
'report': <ReportPage {...props} />,
|
|
|
|
'downloaded': <FileListDownloaded {...props} />,
|
|
|
|
'published': <FileListPublished {...props} />,
|
|
|
|
'start': <StartPage {...props} />,
|
|
|
|
'wallet': <WalletPage {...props} />,
|
|
|
|
'send': <WalletPage {...props} />,
|
|
|
|
'receive': <WalletPage {...props} />,
|
2017-05-05 08:13:06 +02:00
|
|
|
'show': <ShowPage {...props} />,
|
2017-05-04 05:44:08 +02:00
|
|
|
'channel': <ChannelPage {...props} />,
|
2017-04-07 07:15:22 +02:00
|
|
|
'publish': <PublishPage {...props} />,
|
|
|
|
'developer': <DeveloperPage {...props} />,
|
|
|
|
'discover': <DiscoverPage {...props} />,
|
2017-05-04 05:44:08 +02:00
|
|
|
'rewards': <RewardsPage {...props} />,
|
2017-05-05 10:01:16 +02:00
|
|
|
'search': <SearchPage {...props} />,
|
2017-04-07 07:15:22 +02:00
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Router
|