From 8e124b6132ff69b25dd2fa25a55412fc4b0b327a Mon Sep 17 00:00:00 2001 From: Daniel Molares Date: Mon, 29 Apr 2024 16:38:08 -0400 Subject: [PATCH 1/2] Removed unnecessary console logs and reworded some others --- assets/js/Components/Admin/UsersPage.js | 3 +-- assets/js/Components/App.js | 2 +- assets/js/Components/Forms/HeadingEmptyForm.js | 6 ++---- assets/js/Components/Forms/TableHeaders.js | 1 - assets/js/Services/Html.js | 2 -- assets/js/getInitialData.js | 2 +- 6 files changed, 5 insertions(+), 11 deletions(-) diff --git a/assets/js/Components/Admin/UsersPage.js b/assets/js/Components/Admin/UsersPage.js index 3df5dd450..8648f3f67 100644 --- a/assets/js/Components/Admin/UsersPage.js +++ b/assets/js/Components/Admin/UsersPage.js @@ -162,7 +162,6 @@ class UsersPage extends React.Component { .then((responseStr) => responseStr.json()) .then((response) => { let users = this.state.users - console.log('response', response); if (response && response.id) { const ind = users.findIndex((el) => { el.id === response.id }) users[ind] = response @@ -183,4 +182,4 @@ class UsersPage extends React.Component { } } -export default UsersPage; \ No newline at end of file +export default UsersPage; diff --git a/assets/js/Components/App.js b/assets/js/Components/App.js index 9b4bab368..f04a13743 100644 --- a/assets/js/Components/App.js +++ b/assets/js/Components/App.js @@ -201,7 +201,7 @@ class App extends React.Component { }); } if (data.data && data.data.id) { - console.log('new data', data.data) + console.log('Found new data!') report = data.data hasNewReport = true } diff --git a/assets/js/Components/Forms/HeadingEmptyForm.js b/assets/js/Components/Forms/HeadingEmptyForm.js index 13cc13420..0df724720 100644 --- a/assets/js/Components/Forms/HeadingEmptyForm.js +++ b/assets/js/Components/Forms/HeadingEmptyForm.js @@ -78,17 +78,15 @@ export default class HeadingEmptyForm extends React.Component { if(!this.state.deleteHeader) { this.checkTextNotEmpty() } - if (this.formErrors.length > 0) { this.setState({ textInputErrors: this.formErrors }) - } - + } + else { this.setState({ textInputErrors: []}) let issue = this.props.activeIssue issue.newHtml = this.processHtml() - console.log(issue.newHtml) this.props.handleIssueSave(issue) } } diff --git a/assets/js/Components/Forms/TableHeaders.js b/assets/js/Components/Forms/TableHeaders.js index c18bcc3d9..bcc47eeec 100644 --- a/assets/js/Components/Forms/TableHeaders.js +++ b/assets/js/Components/Forms/TableHeaders.js @@ -46,7 +46,6 @@ export default class TableHeaders extends React.Component { } handleSubmit() { - console.log('activeIssue', this.props.activeIssue) let issue = this.props.activeIssue issue.newHtml = this.fixHeaders() this.props.handleIssueSave(issue) diff --git a/assets/js/Services/Html.js b/assets/js/Services/Html.js index 436d64511..e8c59ffdd 100644 --- a/assets/js/Services/Html.js +++ b/assets/js/Services/Html.js @@ -37,8 +37,6 @@ export function setInnerText(element, newText) { const children = element.childNodes let textNodeFound = false - console.log(children) - children.forEach(node => { if(node.nodeType === Node.TEXT_NODE) { if(textNodeFound != true) { diff --git a/assets/js/getInitialData.js b/assets/js/getInitialData.js index c9deca9e6..107f76fb2 100644 --- a/assets/js/getInitialData.js +++ b/assets/js/getInitialData.js @@ -16,7 +16,7 @@ export default function getInitialData() { data = JSON.parse(settingsElement.textContent) if (Object.keys(data).length > 0) { - console.log('data', data) + console.log('Data was found and loaded!') } else { console.error('No data loaded!') } From 397705b713cc7364208a53f3be1f463c9e45f86e Mon Sep 17 00:00:00 2001 From: Daniel Molares Date: Mon, 29 Apr 2024 16:49:47 -0400 Subject: [PATCH 2/2] Deleted console log of new data since it printed even when new data isn't found --- assets/js/Components/App.js | 1 - 1 file changed, 1 deletion(-) diff --git a/assets/js/Components/App.js b/assets/js/Components/App.js index f04a13743..e6b8f64d9 100644 --- a/assets/js/Components/App.js +++ b/assets/js/Components/App.js @@ -201,7 +201,6 @@ class App extends React.Component { }); } if (data.data && data.data.id) { - console.log('Found new data!') report = data.data hasNewReport = true }