// @flow import * as PAGES from 'constants/pages'; import * as ICONS from 'constants/icons'; import React from 'react'; import ChannelEdit from 'component/channelEdit'; import Page from 'component/page'; import Button from 'component/button'; import { useHistory } from 'react-router'; import Yrbl from 'component/yrbl'; type Props = { balance: number, }; function ChannelNew(props: Props) { const { balance } = props; const { push, location } = useHistory(); const urlSearchParams = new URLSearchParams(location.search); const redirectUrl = urlSearchParams.get('redirect'); const emptyBalance = balance === 0; return ( {emptyBalance && (

{__('You need LBC to create a channel and upload content.')}

{__( 'Never fear though, there are tons of ways to earn LBC! You can earn or purchase LBC, or you can have your friends send you some.' )}

} /> )} push(redirectUrl || `/$/${PAGES.CHANNELS}`)} />
); } export default ChannelNew;