little error canvas

This commit is contained in:
kinou-p 2023-06-18 21:45:02 +02:00
parent e97cacebd5
commit 8d6e3e95b3
3 changed files with 16 additions and 7 deletions

View File

@ -25,6 +25,9 @@
"styled-components": "^5.3.10", "styled-components": "^5.3.10",
"typescript": "^3.2.1", "typescript": "^3.2.1",
"web-vitals": "^2.1.4" "web-vitals": "^2.1.4"
},
"devDependencies": {
"@types/node": "^20.3.1"
} }
}, },
"node_modules/@adobe/css-tools": { "node_modules/@adobe/css-tools": {
@ -4535,9 +4538,9 @@
"integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==" "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw=="
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "20.1.4", "version": "20.3.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.1.4.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.1.tgz",
"integrity": "sha512-At4pvmIOki8yuwLtd7BNHl3CiWNbtclUbNtScGx4OHfBd4/oWoJC8KRCIxXwkdndzhxOsPXihrsOoydxBjlE9Q==" "integrity": "sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg=="
}, },
"node_modules/@types/parse-json": { "node_modules/@types/parse-json": {
"version": "4.0.0", "version": "4.0.0",
@ -24452,9 +24455,9 @@
"integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==" "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw=="
}, },
"@types/node": { "@types/node": {
"version": "20.1.4", "version": "20.3.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.1.4.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.1.tgz",
"integrity": "sha512-At4pvmIOki8yuwLtd7BNHl3CiWNbtclUbNtScGx4OHfBd4/oWoJC8KRCIxXwkdndzhxOsPXihrsOoydxBjlE9Q==" "integrity": "sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg=="
}, },
"@types/parse-json": { "@types/parse-json": {
"version": "4.0.0", "version": "4.0.0",

View File

@ -45,5 +45,8 @@
"last 1 firefox version", "last 1 firefox version",
"last 1 safari version" "last 1 safari version"
] ]
},
"devDependencies": {
"@types/node": "^20.3.1"
} }
} }

View File

@ -28,7 +28,10 @@ function DrawCanvas(option) {
const socket = io('http://' + process.env.REACT_APP_BASE_URL + ':4000'); const socket = io('http://' + process.env.REACT_APP_BASE_URL + ':4000');
// const socket = socketRef.current // const socket = socketRef.current
console.log("start function"); console.log("start function");
const canvas = document.getElementById('myCanvas');
let canvas;
canvas = document.getElementById('myCanvas');
const ctx = canvas.getContext('2d'); const ctx = canvas.getContext('2d');
// useEffect(() => { // useEffect(() => {