rearchive protection

This commit is contained in:
daniel31x13
2023-10-31 15:44:58 -04:00
parent ccafc997fc
commit 56a281ae3d
14 changed files with 246 additions and 132 deletions
+1 -3
View File
@@ -21,7 +21,6 @@ type Props = {
items: MenuItem[];
points?: { x: number; y: number };
style?: React.CSSProperties;
width?: number; // in rem
};
export default function Dropdown({
@@ -29,7 +28,6 @@ export default function Dropdown({
onClickOutside,
className,
items,
width,
}: Props) {
const [pos, setPos] = useState<{ x: number; y: number }>();
const [dropdownHeight, setDropdownHeight] = useState<number>();
@@ -60,7 +58,7 @@ export default function Dropdown({
setPos({ x: finalX, y: finalY });
}
}, [points, width, dropdownHeight]);
}, [points, dropdownHeight]);
return (
(!points || pos) && (