Skip to content

Commit

Permalink
chore: remove unnecessary ref
Browse files Browse the repository at this point in the history
  • Loading branch information
stepan662 committed Jan 23, 2025
1 parent 2ae5bbf commit 4e7b9e5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions webapp/src/component/ScreenshotWithLabels.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Tooltip, useTheme } from '@mui/material';
import { CSSProperties, useEffect, useRef, useState } from 'react';
import { CSSProperties, useEffect, useState } from 'react';

import { components } from 'tg.service/apiSchema.generated';

Expand Down Expand Up @@ -37,7 +37,6 @@ export const ScreenshotWithLabels: React.FC<Props> = ({
}) => {
const strokeWidth = STROKE_WIDTH * scaleHighlight;
const theme = useTheme();
const imgRef = useRef<SVGImageElement>(null);

const [size, setSize] = useState({ width: 0, height: 0 });

Expand Down Expand Up @@ -66,7 +65,6 @@ export const ScreenshotWithLabels: React.FC<Props> = ({
data-cy="screenshot-image"
>
<image
ref={imgRef}
href={screenshot.src}
width={screenshot.width || size.width}
height={screenshot.height || size.height}
Expand Down

0 comments on commit 4e7b9e5

Please sign in to comment.