99ab165a8f
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
36 lines
786 B
JavaScript
36 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;
|