From 5e6d790bb33f341a82c19cbfec7d4753d72d2181 Mon Sep 17 00:00:00 2001 From: 6ea86b96 <6ea86b96@gmail.com> Date: Wed, 12 Jul 2017 14:05:10 +0700 Subject: [PATCH] Drop notice component --- ui/js/component/notice.js | 27 --------------------------- ui/js/component/publishForm/view.jsx | 13 ++++--------- 2 files changed, 4 insertions(+), 36 deletions(-) delete mode 100644 ui/js/component/notice.js diff --git a/ui/js/component/notice.js b/ui/js/component/notice.js deleted file mode 100644 index 623ed51ec..000000000 --- a/ui/js/component/notice.js +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react"; - -export class Notice extends React.PureComponent { - static propTypes = { - isError: React.PropTypes.bool, - }; - - static defaultProps = { - isError: false, - }; - - render() { - return ( -
- {this.props.children} -
- ); - } -} - -export default Notice; diff --git a/ui/js/component/publishForm/view.jsx b/ui/js/component/publishForm/view.jsx index 95abbaa96..26eadf74b 100644 --- a/ui/js/component/publishForm/view.jsx +++ b/ui/js/component/publishForm/view.jsx @@ -4,7 +4,6 @@ import lbryuri from "lbryuri"; import { FormField, FormRow } from "component/form.js"; import Link from "component/link"; import Modal from "component/modal"; -import Notice from "component/notice"; import { BusyMessage } from "component/common"; import ChannelSection from "./internal/ChannelSection"; @@ -190,7 +189,7 @@ class PublishForm extends React.PureComponent { if (!claim) return true; if (!myClaimInfo) return false; - return myClaimInfo.amount >= claimInfo.amount; + return myClaimInfo.amount >= claim.amount; } myClaimInfo() { @@ -453,11 +452,7 @@ class PublishForm extends React.PureComponent { getNameBidHelpText() { if (this.state.prefillDone) { - return ( - - {__("Existing claim data was prefilled")} - - ); + return __("Existing claim data was prefilled"); } if ( @@ -472,13 +467,13 @@ class PublishForm extends React.PureComponent { return __("This URL is unused."); } else if (this.myClaimExists() && !this.state.prefillDone) { return ( - + {__("You already have a claim with this name.")}{" "} this.handlePrefillClicked()} /> - + ); } else if (this.claim()) { if (this.topClaimValue() === 1) {