Skip to content

Commit 8b4eec4

Browse files
committed
chore: sonarqube issues fix
1 parent f5f8d11 commit 8b4eec4

File tree

6 files changed

+6
-22
lines changed

6 files changed

+6
-22
lines changed

code/components/actions/mask-eraser-tool/mask-eraser-tool.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@ export class MaskEraserToolAction extends WeaveAction {
3535

3636
pointIntersectsElement(point?: Konva.Vector2d): Konva.Node | null {
3737
const stage = this.instance.getStage();
38-
const relativeMousePointer = point
39-
? point
40-
: (stage.getPointerPosition() ?? { x: 0, y: 0 });
38+
const relativeMousePointer = point ??
39+
stage.getPointerPosition() ?? { x: 0, y: 0 };
4140

4241
const utilityLayer = this.instance.getUtilityLayer();
4342

@@ -69,7 +68,6 @@ export class MaskEraserToolAction extends WeaveAction {
6968
}
7069
maskTransformer.forceUpdate();
7170
}
72-
return;
7371
}
7472
});
7573
}
@@ -142,7 +140,6 @@ export class MaskEraserToolAction extends WeaveAction {
142140
this.instance.getActiveAction() === MASK_ERASER_TOOL_ACTION_NAME
143141
) {
144142
this.cancelAction();
145-
return;
146143
}
147144
});
148145

code/components/room-components/context-menu.tsx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -101,22 +101,9 @@ export const ContextMenuRender = ({
101101
}
102102
}
103103

104-
// function checkIfTouchOutside(e: TouchEvent) {
105-
// if (
106-
// ref.current &&
107-
// e.target !== ref.current &&
108-
// !ref.current.contains(e.target as Node)
109-
// ) {
110-
// ref.current.style.display = `none`;
111-
// onChanged(false);
112-
// }
113-
// }
114-
115-
// window.addEventListener("pointerclick", checkIfClickedOutside);
116104
window.addEventListener("pointerdown", checkIfClickedOutside);
117105

118106
return () => {
119-
// window.removeEventListener("click", checkIfClickedOutside);
120107
window.removeEventListener("pointerdown", checkIfClickedOutside);
121108
};
122109
// eslint-disable-next-line react-hooks/exhaustive-deps

code/components/room-components/overlay/llm-popup-v2.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ export function LLMGenerationV2Popup() {
520520
{/* eslint-disable-next-line @next/next/no-img-element */}
521521
<img
522522
src={imageReference.base64Image}
523-
alt={`Reference image ${index + 1}`}
523+
alt={`Reference ${index + 1}`}
524524
className="w-[160px] h-[160px] bg-transparent object-contain"
525525
/>
526526
<div className="w-[160px] font-inter text-center text-xs py-3">

code/components/room-components/overlay/llm-popup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ export function LLMGenerationPopup() {
301301
{/* eslint-disable-next-line @next/next/no-img-element */}
302302
<img
303303
src={imageReference.base64Image}
304-
alt={`Image reference ${index + 1}`}
304+
alt={`Reference ${index + 1}`}
305305
className="w-full h-full bg-transparent object-contain"
306306
/>
307307
<div className="font-inter text-xs mt-1">

code/components/room-components/overlay/llm-predictions-selection-v2.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export function LLMPredictionsSelectionV2Popup() {
180180
{/* eslint-disable-next-line @next/next/no-img-element */}
181181
<img
182182
src={`data:image/png;base64,${prediction.b64_json}`}
183-
alt="Image generated by LLM"
183+
alt="Generated by LLM"
184184
onKeyUp={(e) => {
185185
if (e.key === "Space") {
186186
let newSelectedImages = [...selectedImages];

code/components/room-components/overlay/llm-reference-selection-v2.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ export const LLMReferenceSelectionV2Popup = () => {
191191
setSelectedImages(unique);
192192
}}
193193
src={imageUrl}
194-
alt="An image"
194+
alt={`Reference ${image}`}
195195
/>
196196
</div>
197197
);

0 commit comments

Comments
 (0)