diff options
| author | bobzel <zzzman@gmail.com> | 2025-01-08 12:17:49 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2025-01-08 12:17:49 -0500 |
| commit | cb11630ed4fe7d588a5055357805fb1ac972fc75 (patch) | |
| tree | aadbed3dd05fc9dfa32b09120b247ff61c0a1cdf /src/client/views/nodes/imageEditor/ImageEditor.tsx | |
| parent | 2f7d1f0073943e1eb9e0f34c4459bc0176377697 (diff) | |
minor cleanup
Diffstat (limited to 'src/client/views/nodes/imageEditor/ImageEditor.tsx')
| -rw-r--r-- | src/client/views/nodes/imageEditor/ImageEditor.tsx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/client/views/nodes/imageEditor/ImageEditor.tsx b/src/client/views/nodes/imageEditor/ImageEditor.tsx index 809ced2f6..2ae6ee1dd 100644 --- a/src/client/views/nodes/imageEditor/ImageEditor.tsx +++ b/src/client/views/nodes/imageEditor/ImageEditor.tsx @@ -1,5 +1,4 @@ /* eslint-disable no-use-before-define */ -/* eslint-disable react/function-component-definition */ import { Checkbox, FormControlLabel, Slider, TextField } from '@mui/material'; import { Button, IconButton, Type } from '@dash/components'; import * as React from 'react'; @@ -311,7 +310,6 @@ const ImageEditor = ({ imageEditorOpen, imageEditorSource, imageRootDoc, addDoc } if (!(originalImg.current && imageRootDoc)) return; // add the doc to the main freeform - // eslint-disable-next-line no-use-before-define await createNewImgDoc(originalImg.current, true); originalImg.current = currImg.current; originalDoc.current = parentDoc.current; @@ -320,14 +318,12 @@ const ImageEditor = ({ imageEditorOpen, imageEditorSource, imageRootDoc, addDoc const imgUrls = await Promise.all(urls.map(url => ImageUtility.convertImgToCanvasUrl(url, canvasDims.width, canvasDims.height))); const imgRes = await Promise.all( imgUrls.map(async url => { - // eslint-disable-next-line no-use-before-define const saveRes = await onSave(url); return { url, saveRes }; }) ); setEdits(imgRes); const image = new Image(); - // eslint-disable-next-line prefer-destructuring image.src = imgUrls[0]; ImageUtility.drawImgToCanvas(image, canvasRef, canvasDims.width, canvasDims.height); currImg.current = image; @@ -751,10 +747,9 @@ const ImageEditor = ({ imageEditorOpen, imageEditorSource, imageRootDoc, addDoc function renderEditThumbnails() { return ( <div className="editsBox"> - {edits.map((edit, i) => ( + {edits.map(edit => ( <img - // eslint-disable-next-line react/no-array-index-key - key={i} + key={edit.url} alt="image edits" width={75} src={edit.url} |
