Skip to content

Commit

Permalink
17.07.2024 исправил ошибки в форме исправления кампании (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakogri authored Aug 4, 2024
1 parent 206fc48 commit 926d10a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
12 changes: 2 additions & 10 deletions src/components/EditCampaign.js
Original file line number Diff line number Diff line change
Expand Up @@ -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] === ' '))
Expand Down Expand Up @@ -368,7 +364,7 @@ class EditCampaign extends React.Component {
return (
<div>
<Modal size='xl' show={this.state.showModalМistakes} onHide={()=>{}} className='myModal' centered>
<Modal.Body className='createFormPlaceHolder'>
<Modal.Body className='createFormPlaceHolder'>
<p className='modalIcon'><ExclamationTriangle/></p>
<Row class="justify-content-center">
<Col class="my-auto">
Expand Down Expand Up @@ -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});
Expand Down
3 changes: 2 additions & 1 deletion src/components/TextEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,6 @@ class TextEditorRu extends TextEditor{

function setEditorState(storedState, hasContent) {
if(hasContent) {

const contentState = convertFromRaw(storedState);
STOREDSTATE = contentState;
} else {
Expand All @@ -583,6 +582,7 @@ class TextEditorRu extends TextEditor{
if(hasContent) {
DESCRIPTIONRAWEN = storedState;
const contentState = convertFromRaw(storedState);
DESCRIPTIONRAWEN = convertToRaw(contentState);
STOREDSTATEEN = contentState;
} else {
STOREDSTATEEN = {};
Expand All @@ -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 = {};
Expand Down

0 comments on commit 926d10a

Please sign in to comment.