Skip to content

Commit 468ed53

Browse files
authored
Merge pull request #24 from lassiecoder/staging
fix: ref issue in floating-dock
2 parents 79d5ac9 + c7089bb commit 468ed53

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/ui/floating-dock.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ function IconContainer({
127127
icon: React.ReactNode;
128128
href: string;
129129
}) {
130-
let ref = useRef<HTMLDivElement>(null);
130+
// let ref = useRef<HTMLDivElement>(null);
131+
const ref = useRef<HTMLDivElement>(null!) as React.RefObject<HTMLElement>;
131132

132133
let distance = useTransform(mouseX, (val) => {
133134
let bounds = ref.current?.getBoundingClientRect() ?? { x: 0, width: 0 };

0 commit comments

Comments
 (0)