chore: normalize line endings

This commit is contained in:
Maze Winther
2026-03-29 15:56:48 +02:00
parent 82817cb50c
commit 4d127a038b
736 changed files with 73880 additions and 73782 deletions
+31 -31
View File
@@ -1,31 +1,31 @@
import { useCallback, useRef } from "react";
export function useElementRegistry() {
const elementRefs = useRef<Map<string, HTMLElement>>(new Map());
const registerElement = useCallback(
(id: string, element: HTMLElement | null) => {
if (element) {
elementRefs.current.set(id, element);
return;
}
elementRefs.current.delete(id);
},
[],
);
const getElement = useCallback((id: string) => {
return elementRefs.current.get(id) ?? null;
}, []);
const getElements = useCallback(() => {
return elementRefs.current;
}, []);
return {
registerElement,
getElement,
getElements,
};
}
import { useCallback, useRef } from "react";
export function useElementRegistry() {
const elementRefs = useRef<Map<string, HTMLElement>>(new Map());
const registerElement = useCallback(
(id: string, element: HTMLElement | null) => {
if (element) {
elementRefs.current.set(id, element);
return;
}
elementRefs.current.delete(id);
},
[],
);
const getElement = useCallback((id: string) => {
return elementRefs.current.get(id) ?? null;
}, []);
const getElements = useCallback(() => {
return elementRefs.current;
}, []);
return {
registerElement,
getElement,
getElements,
};
}