performance table rewrite and shared sort direction

This commit is contained in:
tresabhi committed 2026-11-17 22:01:46 -06:00
1 parent 966651284d
commit 0578f47914
38 files changed
+965 -874

No files matched your search

@@ -1,14 +1,31 @@
import { useEffect, useRef } from "react";
import { InlineSkeleton } from "../InlineSkeleton";
import { Skeleton } from "../Skeleton";
import styles from "./index.module.css";
type TankCardProps = {
compact?: boolean;
onIntersection?: () => void;
};
export const TankCardSkeleton = ({ compact }: TankCardProps) => {
export const TankCardSkeleton = ({ compact, onIntersection }: TankCardProps) => {
const wrapper = useRef<HTMLDivElement>(null);
useEffect(() => {
if (!onIntersection) return;
const observer = new IntersectionObserver(([entry]) => {
if (entry.isIntersecting) onIntersection();
});
observer.observe(wrapper.current!);
return () => observer.disconnect();
}, []);
return (
<div
ref={wrapper}
className={styles.wrapper}
data-compact={compact}
style={{