Skip to content

Commit

Permalink
fixed warnings scorelab#107 scorelab#109
Browse files Browse the repository at this point in the history
  • Loading branch information
swapnalshahil committed Dec 10, 2020
1 parent 4d210fe commit 465dc22
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion tensormap-client/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import MuiThemeProvider from '@material-ui/core/styles/MuiThemeProvider'
import { ThemeProvider as MuiThemeProvider } from '@material-ui/core/styles'
import React from 'react'
import ReactDOM from 'react-dom'
import {Provider} from 'react-redux'
Expand Down
12 changes: 6 additions & 6 deletions tensormap-client/src/pages/adddata/AddData.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {withStyles} from '@material-ui/core'
import PropTypes from 'prop-types'
import * as React from 'react'
import styles from './AddData.styles'
import { withRouter } from 'react-router-dom';


class AddData extends React.Component {

Expand All @@ -19,16 +19,16 @@ class AddData extends React.Component {

validateFileType(e)
{
var name = null
//var name = null
let filepath= e.target.value;
var ext = filepath.substring(filepath.lastIndexOf('.') + 1);
this.setState({fileData:e.target.files[0]})
if(this.state.fileType == "null"){
if(this.state.fileType === "null"){
e.target.value = ""
alert("Select File Type");
}
else{
if(ext != this.state.fileType ) {
if(ext !== this.state.fileType ) {
e.target.value = ""
alert("Unsupported File Type");
}
Expand All @@ -44,7 +44,7 @@ class AddData extends React.Component {
{
e.preventDefault();

if(this.state.fileType == "null" || this.state.fileData == "null"){
if(this.state.fileType === "null" || this.state.fileData === "null"){
alert("Select File Type And Upload File")
}
else{
Expand All @@ -58,7 +58,7 @@ class AddData extends React.Component {
}).then((response) => {
return response.text();
}).then((responseText) => {
if(responseText == "error"){
if(responseText === "error"){
alert ("Dataset with identical name already exists");
}
else{
Expand Down
2 changes: 1 addition & 1 deletion tensormap-client/src/pages/viewdata/assets/Table.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class EnhancedTable extends React.Component {
id.forEach((x) =>{
getDeleteHandler(x);
this.state.data.forEach((y) => {
if(y.id == x){
if(y.id === x){
console.log(x, "deleted")
}
else{
Expand Down
12 changes: 6 additions & 6 deletions tensormap-client/src/pages/visualizedata/VisualizeData.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ class VisualizeData extends React.Component {
console.log(e.target.value);
var tempData = [...this.state.columnCheckBoxes]
for (var column in tempData) {
if (e.target.value == tempData[column].title){
if (e.target.value === tempData[column].title){
tempData[column].checked = !(tempData[column].checked)
break;
}
Expand All @@ -303,7 +303,7 @@ class VisualizeData extends React.Component {
console.log(e.target.value);
var tempData = [...this.state.labels]
for (var column in tempData) {
if (e.target.value == tempData[column].title){
if (e.target.value === tempData[column].title){
tempData[column].checked = !(tempData[column].checked)
break;
}
Expand All @@ -323,7 +323,7 @@ class VisualizeData extends React.Component {
var featureColumn = null
for (var column in tempFeatureData) {
console.log(tempFeatureData[column].title)
if (e.target.value == tempFeatureData[column].title){
if (e.target.value === tempFeatureData[column].title){
tempFeatureData[column].checked = !(tempFeatureData[column].checked)
featureColumn = tempFeatureData[column]
console.log(featureColumn)
Expand All @@ -337,17 +337,17 @@ class VisualizeData extends React.Component {
console.log(featureColumn.checked)
var currentLabels = [...this.state.labels]

if(featureColumn.checked == true){
if(featureColumn.checked === true){
console.log("y")
for(var labeldata in currentLabels){
if (e.target.value == currentLabels[labeldata].title){
if (e.target.value === currentLabels[labeldata].title){
currentLabels.splice(currentLabels.indexOf(currentLabels[labeldata]), 1);
this.setState({labels:currentLabels});
break;
}
}
}
else if(featureColumn.checked == false){
else if(featureColumn.checked === false){
console.log("else")
var labelCheckBoxAlter = featureColumn
labelCheckBoxAlter.checked = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const styles = theme => ({
backgroundColor: 'green'
},
table: {
fontFamily: '\"Trebuchet MS\", Arial, Helvetica, sans-serif',
fontFamily: '"Trebuchet MS", Arial, Helvetica, sans-serif',
borderCollapse: 'collapse',
width: '100%',
},
Expand Down
2 changes: 1 addition & 1 deletion tensormap-client/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"isolatedModules": false,
"isolatedModules": true,
"target": "es5",
"lib": [
"dom",
Expand Down

0 comments on commit 465dc22

Please sign in to comment.