We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9605c65 commit d453bbdCopy full SHA for d453bbd
app/ui/utils.ts
@@ -1,4 +1,3 @@
1
-import { useLocation } from "react-router";
2
import { useEffect, useState } from "react";
3
4
let hydrating = true;
@@ -15,7 +14,6 @@ export function useHydrated() {
15
14
export function useCodeBlockCopyButton(
16
ref: React.RefObject<HTMLElement | null>
17
) {
18
- let location = useLocation();
19
useEffect(() => {
20
let container = ref.current;
21
if (!container) return;
@@ -72,5 +70,5 @@ export function useCodeBlockCopyButton(
72
70
window.clearTimeout(props.to);
73
71
}
74
};
75
- }, [ref, location.pathname]);
+ });
76
0 commit comments