apps/meteor/client/views/room/hooks/useDateScroll.ts
Function useDateScroll
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const useDateScroll = (margin = 8): useDateScrollReturn => {
const [bubbleDate, setBubbleDate] = useSafely(
useState<{
date: string;
show: boolean;
Function callbackRef
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(node: HTMLElement | null) => {
if (!node) {
return;
}
const bubbleOffset = bubbleRef.current?.getBoundingClientRect().bottom || 0;
Function onScroll
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const onScroll = (() => {
let timeout: ReturnType<typeof setTimeout>;
return (elements: Set<HTMLElement>) => {
clearTimeout(timeout);