Removed unnecessary console logs

This commit is contained in:
Leoh 2021-10-19 19:29:31 +05:30
parent 75b18f2f2a
commit a3cc611dbc
10 changed files with 4 additions and 205 deletions

13
main.js

File diff suppressed because one or more lines are too long

View file

@ -71,7 +71,6 @@ class App extends React.Component<any,any> {
result => { result => {
if(result.success) { if(result.success) {
this.sendNotice("Checked!") this.sendNotice("Checked!")
console.log(result)
this.reloadData() this.reloadData()
} else { } else {
this.sendNotice("Resyncing, please try again") this.sendNotice("Resyncing, please try again")
@ -90,7 +89,6 @@ class App extends React.Component<any,any> {
result => { result => {
if(result.success){ if(result.success){
this.sendNotice("Un-checked!") this.sendNotice("Un-checked!")
console.log(result)
this.reloadData() this.reloadData()
} else { } else {
this.sendNotice("Resyncing, please try again") this.sendNotice("Resyncing, please try again")
@ -116,7 +114,6 @@ class App extends React.Component<any,any> {
result => { result => {
if(result.success) { if(result.success) {
this.sendNotice("Checked!") this.sendNotice("Checked!")
console.log(result)
this.reloadData() this.reloadData()
} else { } else {
this.sendNotice("Resyncing, please try again") this.sendNotice("Resyncing, please try again")
@ -135,7 +132,6 @@ class App extends React.Component<any,any> {
result => { result => {
if(result.success){ if(result.success){
this.sendNotice("Un-checked!") this.sendNotice("Un-checked!")
console.log(result)
this.reloadData() this.reloadData()
} else { } else {
this.sendNotice("Resyncing, please try again") this.sendNotice("Resyncing, please try again")
@ -153,7 +149,6 @@ class App extends React.Component<any,any> {
} }
handleChangeHabits(event: any){ handleChangeHabits(event: any){
const target_id = event.target.id.slice(4) const target_id = event.target.id.slice(4)
console.log(target_id)
if(event.target.id.slice(0,4) == "plus"){ if(event.target.id.slice(0,4) == "plus"){
this.state.tasks.habits.forEach((element: any) => { this.state.tasks.habits.forEach((element: any) => {
if(element.id == target_id){ if(element.id == target_id){
@ -163,7 +158,6 @@ class App extends React.Component<any,any> {
result => { result => {
if(result.success) { if(result.success) {
this.sendNotice("Plus!") this.sendNotice("Plus!")
console.log(result)
this.reloadData() this.reloadData()
} else { } else {
this.sendNotice("Resyncing, please try again") this.sendNotice("Resyncing, please try again")
@ -187,7 +181,6 @@ class App extends React.Component<any,any> {
result => { result => {
if(result.success) { if(result.success) {
this.sendNotice("Minus :(") this.sendNotice("Minus :(")
console.log(result)
this.reloadData() this.reloadData()
} else { } else {
this.sendNotice("Resyncing, please try again") this.sendNotice("Resyncing, please try again")

View file

@ -1,56 +0,0 @@
.react-tabs {
-webkit-tap-highlight-color: transparent;
}
.react-tabs__tab-list {
border-bottom: 1px solid #aaa;
margin: 0 0 10px;
padding: 0;
}
.react-tabs__tab {
display: inline-block;
border: 1px solid transparent;
border-bottom: none;
bottom: -1px;
position: relative;
list-style: none;
padding: 6px 12px;
cursor: pointer;
}
.react-tabs__tab--selected {
background: #fff;
border-color: #aaa;
color: black;
border-radius: 5px 5px 0 0;
}
.react-tabs__tab--disabled {
color: GrayText;
cursor: default;
}
.react-tabs__tab:focus {
box-shadow: 0 0 5px hsl(208, 99%, 50%);
border-color: hsl(208, 99%, 50%);
outline: none;
}
.react-tabs__tab:focus:after {
content: "";
position: absolute;
height: 5px;
left: -4px;
right: -4px;
bottom: -5px;
background: #fff;
}
.react-tabs__tab-panel {
display: none;
}
.react-tabs__tab-panel--selected {
display: block;
}

View file

@ -1 +0,0 @@
import * as React from "react"

View file

@ -1,14 +1,13 @@
import * as React from "react"; import * as React from "react";
function HabitItem(props: any) { function HabitItem(props: any) {
console.log("plus"+props.id)
return ( return (
<div className="habit-item" id={props.id}> <div className="habit-item" id={props.id}>
<button className="habit-plus" id={"plus"+props.id} onClick={props.onChange}> <button className="habit-plus" id={"plus"+props.id} onClick={props.onChange}>
+{props.upCount} +{props.upCount}
</button> </button>
<p>{props.habit_text}</p> <p>{props.habit_text}</p>
<button className="habit-minus" id={"mins"+props.id} onClick={props.onChange}> <button className="habit-plus" id={"mins"+props.id} onClick={props.onChange}>
-{props.downCount} -{props.downCount}
</button> </button>
</div> </div>

View file

@ -8,7 +8,6 @@ export default function Index(props: any){
</div>) </div>)
} }
else { else {
console.log("habits = " + props.habits);
const allHabits = props.habits.map((habit: any) => { const allHabits = props.habits.map((habit: any) => {
return <HabitItem key={habit.id} id={habit.id} habit_text={habit.text} upCount={habit.counterUp} downCount={habit.counterDown} onChange={props.onChange}/> return <HabitItem key={habit.id} id={habit.id} habit_text={habit.text} upCount={habit.counterUp} downCount={habit.counterDown} onChange={props.onChange}/>
}) })

View file

@ -1,56 +0,0 @@
.react-tabs {
-webkit-tap-highlight-color: transparent;
}
.react-tabs__tab-list {
border-bottom: 1px solid #aaa;
margin: 0 0 10px;
padding: 0;
}
.react-tabs__tab {
display: inline-block;
border: 1px solid transparent;
border-bottom: none;
bottom: -1px;
position: relative;
list-style: none;
padding: 6px 12px;
cursor: pointer;
}
.react-tabs__tab--selected {
background: #fff;
border-color: #aaa;
color: black;
border-radius: 5px 5px 0 0;
}
.react-tabs__tab--disabled {
color: GrayText;
cursor: default;
}
.react-tabs__tab:focus {
box-shadow: 0 0 5px hsl(208, 99%, 50%);
border-color: hsl(208, 99%, 50%);
outline: none;
}
.react-tabs__tab:focus:after {
content: "";
position: absolute;
height: 5px;
left: -4px;
right: -4px;
bottom: -5px;
background: #fff;
}
.react-tabs__tab-panel {
display: none;
}
.react-tabs__tab-panel--selected {
display: block;
}

View file

@ -1 +0,0 @@
import * as React from "react"

View file

@ -1,58 +0,0 @@
.react-tabs {
-webkit-tap-highlight-color: transparent;
}
.react-tabs__tab-list {
border-bottom: 1px solid #aaa;
margin: 0 0 10px;
padding: 0;
}
.react-tabs__tab {
display: inline-block;
border: 1px solid transparent;
border-bottom: none;
bottom: -1px;
position: relative;
list-style: none;
padding: 6px 12px;
cursor: pointer;
}
.react-tabs__tab--selected {
background: #fff;
border-color: #aaa;
color: black;
border-radius: 5px 5px 0 0;
}
.react-tabs__tab--disabled {
color: GrayText;
cursor: default;
}
.react-tabs__tab:focus {
box-shadow: 0 0 5px hsl(208, 99%, 50%);
border-color: hsl(208, 99%, 50%);
outline: none;
}
.re
.react-tabs__tab:focus:after {
content: "";
position: absolute;
height: 5px;
left: -4px;
right: -4px;
bottom: -5px;
background: #fff;
}
.react-tabs__tab-panel {
display: none;
}
.react-tabs__tab-panel--selected {
display: block;
}

View file

@ -33,18 +33,7 @@
padding: 6px 10px; padding: 6px 10px;
text-align: center; text-align: center;
text-decoration: none; text-decoration: none;
font-size: 16px; font-size: 14px;
}
.habit-minus {
/* background-color: #fff; */
border-radius: 50%;
border: none;
color: white;
padding: 7px 10px;
text-align: center;
text-decoration: none;
font-size: 16px;
} }
.habit-item { .habit-item {