From 926d10ac1649ee30c824dd8358ceccb5fc00aa38 Mon Sep 17 00:00:00 2001 From: jakogri Date: Sun, 4 Aug 2024 23:23:43 +0300 Subject: [PATCH] =?UTF-8?q?17.07.2024=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0?= =?UTF-8?q?=D0=B2=D0=B8=D0=BB=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B8=20?= =?UTF-8?q?=D0=B2=20=D1=84=D0=BE=D1=80=D0=BC=D0=B5=20=D0=B8=D1=81=D0=BF?= =?UTF-8?q?=D1=80=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BA=D0=B0?= =?UTF-8?q?=D0=BC=D0=BF=D0=B0=D0=BD=D0=B8=D0=B8=20(#181)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/EditCampaign.js | 12 ++---------- src/components/TextEditor.js | 3 ++- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/components/EditCampaign.js b/src/components/EditCampaign.js index c2661fb..014f7db 100644 --- a/src/components/EditCampaign.js +++ b/src/components/EditCampaign.js @@ -99,11 +99,7 @@ class EditCampaign extends React.Component { const name = e.target.name const value = e.target.value; const checked = e.target.checked; - if (name === 'EtheriumCheckbox') - this.setState({isInEtherium: checked}); - else if (name === 'TronCheckbox') - this.setState({isInTron: checked}); - else if(e.target.name === 'number'){ + if(e.target.name === 'number'){ help_value = ''; for(let i = 0; i < e.target.value.length; i++){ if ((/^[-0-9]*$/.test(e.target.value[i]) === true)||(e.target.value[i] === ' ')) @@ -368,7 +364,7 @@ class EditCampaign extends React.Component { return (
{}} className='myModal' centered> - +

@@ -783,10 +779,6 @@ class EditCampaign extends React.Component { }); if (dbCampaignObj.payout_chain) this.setState({blockchain:dbCampaignObj.payout_chain}); if (dbCampaignObj.payout_address) this.setState({wallet:dbCampaignObj.payout_address}); - if (this.state.addresses[this.state.chainId]) this.setState({isInEtherium:true}); - else this.setState({isInEtherium:false}); - if (this.state.addresses[this.state.tronChainId]) this.setState({isInTron:true}); - else this.setState({isInTron:false}); if(dbCampaignObj.descriptionEditor.en){ setEditorStateEn(dbCampaignObj.descriptionEditor.en, true); this.setState({updatedEditorStateEn : true}); diff --git a/src/components/TextEditor.js b/src/components/TextEditor.js index b82f3aa..e6dedb6 100644 --- a/src/components/TextEditor.js +++ b/src/components/TextEditor.js @@ -571,7 +571,6 @@ class TextEditorRu extends TextEditor{ function setEditorState(storedState, hasContent) { if(hasContent) { - const contentState = convertFromRaw(storedState); STOREDSTATE = contentState; } else { @@ -583,6 +582,7 @@ class TextEditorRu extends TextEditor{ if(hasContent) { DESCRIPTIONRAWEN = storedState; const contentState = convertFromRaw(storedState); + DESCRIPTIONRAWEN = convertToRaw(contentState); STOREDSTATEEN = contentState; } else { STOREDSTATEEN = {}; @@ -592,6 +592,7 @@ class TextEditorRu extends TextEditor{ function setEditorStateRu(storedState, hasContent) { if(hasContent) { const contentState = convertFromRaw(storedState); + DESCRIPTIONRAWRU = convertToRaw(contentState); STOREDSTATERU = contentState; } else { STOREDSTATERU = {};