81eddb2b5d
* Rearrange fields * Autocomplete title * Fix class position * Hide deposit behind advanced settings * Redesign additional options * Redesign price section * Update price section * Redesign tags section * Fix title edit * Make with dynamic * Redesign thumbnail section * Redesign description section * Resedign file section * Polish sections * Adjust help text * Clear title on form reset * Adjust price section * Fix help color in light theme * Polish * Mobile adjustments * More mobile adjustments * Remove border-bottom from publish rows * Redesign date section * Adjust some details * Adjust clear button * Adjust channel selector on mobile * Adjust post save button position * Adjust browse button color * Adjust channel picker on mobile * Eenable announcement page * Remove file title, remove space, redesign licence section * Fix edit form, existing claim warning, missing title warning * Adjust light theme * Adjust icon collor in button
41 lines
962 B
JavaScript
41 lines
962 B
JavaScript
// @flow
|
|
import React from 'react';
|
|
import PublishForm from 'component/publishForm';
|
|
import Page from 'component/page';
|
|
import YrblWalletEmpty from 'component/yrblWalletEmpty';
|
|
import Spinner from 'component/spinner';
|
|
|
|
type Props = {
|
|
balance: number,
|
|
fetchingChannels: boolean,
|
|
};
|
|
|
|
function PublishPage(props: Props) {
|
|
const { balance, fetchingChannels } = props;
|
|
|
|
function scrollToTop() {
|
|
const mainContent = document.querySelector('main');
|
|
if (mainContent) {
|
|
// $FlowFixMe
|
|
mainContent.scrollTo({
|
|
top: 0,
|
|
behavior: 'smooth',
|
|
});
|
|
}
|
|
}
|
|
|
|
return (
|
|
<Page className="uploadPage-wrapper" noFooter>
|
|
{balance === 0 && <YrblWalletEmpty />}
|
|
{balance !== 0 && fetchingChannels ? (
|
|
<div className="main--empty">
|
|
<Spinner />
|
|
</div>
|
|
) : (
|
|
<PublishForm scrollToTop={scrollToTop} disabled={balance === 0} />
|
|
)}
|
|
</Page>
|
|
);
|
|
}
|
|
|
|
export default PublishPage;
|