2019-09-18 20:02:48 +02:00
|
|
|
// @flow
|
2017-12-21 22:08:54 +01:00
|
|
|
import React from 'react';
|
2019-08-23 16:21:53 +02:00
|
|
|
import classnames from 'classnames';
|
2017-12-21 22:08:54 +01:00
|
|
|
import RewardSummary from 'component/rewardSummary';
|
2019-06-17 22:32:38 +02:00
|
|
|
import RewardTotal from 'component/rewardTotal';
|
2018-03-26 23:32:43 +02:00
|
|
|
import Page from 'component/page';
|
2019-08-23 16:21:53 +02:00
|
|
|
import UnsupportedOnWeb from 'component/common/unsupported-on-web';
|
2019-06-17 22:32:38 +02:00
|
|
|
import UserEmail from 'component/userEmail';
|
|
|
|
import InvitePage from 'page/invite';
|
2019-09-13 03:53:33 +02:00
|
|
|
import YoutubeChannelList from 'component/youtubeChannelList';
|
2017-04-22 15:17:01 +02:00
|
|
|
|
2019-09-18 20:02:48 +02:00
|
|
|
type Props = {
|
|
|
|
ytChannels: Array<any>,
|
|
|
|
};
|
|
|
|
|
|
|
|
const AccountPage = (props: Props) => {
|
|
|
|
const { ytChannels } = props;
|
|
|
|
const hasYoutubeChannels = Boolean(ytChannels.length);
|
|
|
|
return (
|
|
|
|
<Page>
|
|
|
|
{/* @if TARGET='web' */}
|
|
|
|
<UserEmail />
|
|
|
|
{/* @endif */}
|
|
|
|
<UnsupportedOnWeb />
|
|
|
|
<div className={classnames({ 'card--disabled': IS_WEB })}>
|
|
|
|
<div className="columns">
|
|
|
|
<UserEmail />
|
|
|
|
<div>
|
|
|
|
<RewardSummary />
|
|
|
|
<RewardTotal />
|
|
|
|
</div>
|
2019-08-23 16:21:53 +02:00
|
|
|
</div>
|
2019-09-18 20:02:48 +02:00
|
|
|
{hasYoutubeChannels && <YoutubeChannelList />}
|
|
|
|
<InvitePage />
|
2019-03-18 16:40:42 +01:00
|
|
|
</div>
|
2019-09-18 20:02:48 +02:00
|
|
|
</Page>
|
|
|
|
);
|
|
|
|
};
|
2017-04-22 15:17:01 +02:00
|
|
|
|
2019-07-29 18:54:46 +02:00
|
|
|
export default AccountPage;
|