Skip to content

Commit

Permalink
Merge pull request #45 from eurunuela/warnings
Browse files Browse the repository at this point in the history
Make Rica wait for 200ms before showing an alert for missing files
  • Loading branch information
eurunuela authored Mar 31, 2022
2 parents 2066b85 + 6ba99f3 commit ece10ca
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
INLINE_RUNTIME_CHUNK=false
GENERATE_SOURCEMAP=false
SKIP_PREFLIGHT_CHECK=true
REACT_APP_VERSION=1.0.12
REACT_APP_VERSION=1.0.13
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rica",
"version": "1.0.12",
"version": "1.0.13",
"private": true,
"dependencies": {
"@blueprintjs/core": "^3.53.0",
Expand Down
24 changes: 16 additions & 8 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,28 @@ class App extends Component {
});
} else if (this.state.componentData.length === 0) {
// Show an alert
console.log("The metrics table is missing.");
alert("The metrics table is missing.");
setTimeout(() => {
console.log("The metrics table is missing.");
alert("The metrics table is missing.");
}, 200);
} else if (this.state.componentFigures.length === 0) {
// Show an alert
console.log("The component figures are missing.");
alert("The component figures are missing.");
setTimeout(() => {
console.log("The component figures are missing.");
alert("The component figures are missing.");
}, 200);
} else if (this.state.carpetFigures.length === 0) {
// Show an alert
console.log("The carpet figures are missing.");
alert("The carpet figures are missing.");
setTimeout(() => {
console.log("The carpet figures are missing.");
alert("The carpet figures are missing.");
}, 200);
} else if (this.state.info === "") {
// Show an alert
console.log("The info is missing.");
alert("The info is missing.");
setTimeout(() => {
console.log("The info is missing.");
alert("The info is missing.");
}, 200);
}
}

Expand Down

0 comments on commit ece10ca

Please sign in to comment.