lbry-desktop/ui/page/publish/view.jsx
zeppi 99ab165a8f New repost flow
Clearer display of takeover amounts
Repost from empty search result, from top page, or from claim

review changes

final touches

bump

empty comment copy

they

emptier

validation cleanup

extra
2020-12-16 09:47:28 -05:00

37 lines
786 B
JavaScript

// @flow
import React from 'react';
import PublishForm from 'component/publishForm';
import Page from 'component/page';
import YrblWalletEmpty from 'component/yrblWalletEmpty';
type Props = {
balance: number,
};
function PublishPage(props: Props) {
const { balance } = props;
function scrollToTop() {
const mainContent = document.querySelector('main');
if (mainContent) {
mainContent.scrollTop = 0; // It would be nice to animate this
}
}
return (
<Page
noFooter
noSideNavigation
backout={{
title: __('Upload'),
backLabel: __('Back'),
}}
>
{balance === 0 && <YrblWalletEmpty />}
<PublishForm scrollToTop={scrollToTop} disabled={balance === 0} />
</Page>
);
}
export default PublishPage;