Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed warnings #107 #109 #141

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tensormap-client/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>TensorMap</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
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
3 changes: 1 addition & 2 deletions 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 All @@ -16,7 +16,6 @@
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "preserve"
},
Expand Down