mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
fix: improve type annotation for barRef in GanttChartBar component
This commit is contained in:
@@ -35,8 +35,9 @@ const Bar: FunctionComponent<ComponentProps> = (
|
||||
props: ComponentProps,
|
||||
): ReactElement => {
|
||||
const [isHovered, setIsHovered] = useState(false);
|
||||
const barRef: React.RefObject<HTMLDivElement | null> =
|
||||
useRef<HTMLDivElement>(null);
|
||||
const barRef: React.RefObject<HTMLDivElement> = useRef<HTMLDivElement>(
|
||||
null,
|
||||
) as React.RefObject<HTMLDivElement>;
|
||||
|
||||
// calculate bar width.
|
||||
let barWidth: number =
|
||||
|
||||
Reference in New Issue
Block a user