mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-09-01 09:45:10 +00:00
Drop notice component
This commit is contained in:
parent
103e4302d4
commit
5e6d790bb3
2 changed files with 4 additions and 36 deletions
|
@ -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 (
|
|
||||||
<section
|
|
||||||
className={
|
|
||||||
"notice " +
|
|
||||||
(this.props.isError ? "notice--error " : "") +
|
|
||||||
(this.props.className || "")
|
|
||||||
}
|
|
||||||
>
|
|
||||||
{this.props.children}
|
|
||||||
</section>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Notice;
|
|
|
@ -4,7 +4,6 @@ import lbryuri from "lbryuri";
|
||||||
import { FormField, FormRow } from "component/form.js";
|
import { FormField, FormRow } from "component/form.js";
|
||||||
import Link from "component/link";
|
import Link from "component/link";
|
||||||
import Modal from "component/modal";
|
import Modal from "component/modal";
|
||||||
import Notice from "component/notice";
|
|
||||||
import { BusyMessage } from "component/common";
|
import { BusyMessage } from "component/common";
|
||||||
import ChannelSection from "./internal/ChannelSection";
|
import ChannelSection from "./internal/ChannelSection";
|
||||||
|
|
||||||
|
@ -190,7 +189,7 @@ class PublishForm extends React.PureComponent {
|
||||||
if (!claim) return true;
|
if (!claim) return true;
|
||||||
if (!myClaimInfo) return false;
|
if (!myClaimInfo) return false;
|
||||||
|
|
||||||
return myClaimInfo.amount >= claimInfo.amount;
|
return myClaimInfo.amount >= claim.amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
myClaimInfo() {
|
myClaimInfo() {
|
||||||
|
@ -453,11 +452,7 @@ class PublishForm extends React.PureComponent {
|
||||||
|
|
||||||
getNameBidHelpText() {
|
getNameBidHelpText() {
|
||||||
if (this.state.prefillDone) {
|
if (this.state.prefillDone) {
|
||||||
return (
|
return __("Existing claim data was prefilled");
|
||||||
<Notice>
|
|
||||||
{__("Existing claim data was prefilled")}
|
|
||||||
</Notice>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
@ -472,13 +467,13 @@ class PublishForm extends React.PureComponent {
|
||||||
return __("This URL is unused.");
|
return __("This URL is unused.");
|
||||||
} else if (this.myClaimExists() && !this.state.prefillDone) {
|
} else if (this.myClaimExists() && !this.state.prefillDone) {
|
||||||
return (
|
return (
|
||||||
<Notice>
|
<span>
|
||||||
{__("You already have a claim with this name.")}{" "}
|
{__("You already have a claim with this name.")}{" "}
|
||||||
<Link
|
<Link
|
||||||
label={__("Use data from my existing claim")}
|
label={__("Use data from my existing claim")}
|
||||||
onClick={() => this.handlePrefillClicked()}
|
onClick={() => this.handlePrefillClicked()}
|
||||||
/>
|
/>
|
||||||
</Notice>
|
</span>
|
||||||
);
|
);
|
||||||
} else if (this.claim()) {
|
} else if (this.claim()) {
|
||||||
if (this.topClaimValue() === 1) {
|
if (this.topClaimValue() === 1) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue