Skip to content

Commit

Permalink
Fixed warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
indierodo committed Apr 15, 2024
1 parent 46d04cb commit 8fffc21
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 88 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/react.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Run tests
run: npm test

- name: Deploy
- name: Build and Deploy
run: |
git config --global user.name $user_name
git config --global user.email $user_email
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ logs

node_modules
bower_components
build

psd
thumb
Expand Down
6 changes: 3 additions & 3 deletions build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"files": {
"main.css": "/static/css/main.0c850e8a.css",
"main.js": "/static/js/main.dd37dcc3.js",
"main.js": "/static/js/main.25c49a3c.js",
"static/js/488.d4752a36.chunk.js": "/static/js/488.d4752a36.chunk.js",
"static/media/background.png": "/static/media/background.86fce218d70884e94fec.png",
"static/media/container.png": "/static/media/container.35391e7530bcdaf3cb13.png",
Expand All @@ -14,11 +14,11 @@
"static/media/hamburger.png": "/static/media/hamburger.37a463e4c42be2188042.png",
"index.html": "/index.html",
"main.0c850e8a.css.map": "/static/css/main.0c850e8a.css.map",
"main.dd37dcc3.js.map": "/static/js/main.dd37dcc3.js.map",
"main.25c49a3c.js.map": "/static/js/main.25c49a3c.js.map",
"488.d4752a36.chunk.js.map": "/static/js/488.d4752a36.chunk.js.map"
},
"entrypoints": [
"static/css/main.0c850e8a.css",
"static/js/main.dd37dcc3.js"
"static/js/main.25c49a3c.js"
]
}
2 changes: 1 addition & 1 deletion build/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>rol.tools</title><script defer="defer" src="/static/js/main.dd37dcc3.js"></script><link href="/static/css/main.0c850e8a.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>rol.tools</title><script defer="defer" src="/static/js/main.25c49a3c.js"></script><link href="/static/css/main.0c850e8a.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
3 changes: 0 additions & 3 deletions build/static/js/main.dd37dcc3.js

This file was deleted.

72 changes: 0 additions & 72 deletions build/static/js/main.dd37dcc3.js.LICENSE.txt

This file was deleted.

1 change: 0 additions & 1 deletion build/static/js/main.dd37dcc3.js.map

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"test": "react-scripts test --passWithNoTests",
"eject": "react-scripts eject",
"predeploy": "npm run build",
"deploy": "CI=false gh-pages -d build"
"deploy": "gh-pages -d build"
},
"eslintConfig": {
"extends": [
Expand Down
2 changes: 1 addition & 1 deletion src/Navbar/Navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function Navbar() {
<nav className="navbar">
<div className='logo'>
<Link to="/" className="navbar-brand">rol.tools</Link>
<div onClick={toggleMenu} className='hamburger-button'><img src={hamburgerIcon}></img></div>
<div onClick={toggleMenu} className='hamburger-button'><img src={hamburgerIcon} alt='menu'></img></div>
</div>
<div className={isOpen ? 'links open' : 'links'}>
<ul>
Expand Down
2 changes: 2 additions & 0 deletions src/routes/NPCs/NPC.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,15 @@ function NPC({ id, onClose }) {
useEffect(() => {
load();
setLoaded(true); // Set loaded flag to true after loading data
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [id]);

// Effect to save NPC data to local storage whenever relevant state variables change
useEffect(() => {
if (loaded) { // Only save data if it has been loaded from local storage
save();
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [name, armorClass, lifePoints, step, loaded]);

return (
Expand Down
10 changes: 5 additions & 5 deletions src/routes/TirarDados/TirarDados.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ function TirarDados() {
let roll1 = Math.floor(Math.random() * dx) + 1;
let roll2 = Math.floor(Math.random() * dx) + 1;

if (modifier == 'none') {
if (modifier === 'none') {
if (roll1 >= minimumToPass) {
succesfulThrows.push(roll1)
} else {
failedThrows.push(roll1)
}
}

else if (modifier == 'advantage') {
else if (modifier === 'advantage') {
const highestRoll = Math.max(roll1, roll2);

if (highestRoll >= minimumToPass) {
Expand All @@ -40,7 +40,7 @@ function TirarDados() {

}

else if (modifier == 'disadvantage') {
else if (modifier === 'disadvantage') {
const lowestRoll = Math.min(roll1, roll2);

if (lowestRoll >= minimumToPass) {
Expand All @@ -62,7 +62,7 @@ function TirarDados() {

for (let i=0; i < failedThrows.length; i++) {
results.push(
<img src={`images/d${dx}/dice${failedThrows[i]}.png`}/>
<img src={`images/d${dx}/dice${failedThrows[i]}.png`} alt={`d${dx} dice${failedThrows[i]}`}/>
);
}

Expand All @@ -72,7 +72,7 @@ function TirarDados() {

for (let i=0; i < succesfulThrows.length; i++) {
results.push(
<img src={`images/d${dx}/dice${succesfulThrows[i]}.png`}/>
<img src={`images/d${dx}/dice${succesfulThrows[i]}.png`} alt={`d${dx} dice${succesfulThrows[i]}`}/>
);
}

Expand Down

0 comments on commit 8fffc21

Please sign in to comment.