fix website build

This commit is contained in:
2025-12-25 12:54:08 +01:00
parent ac083363bc
commit 722a185dd9
26 changed files with 1712 additions and 1419 deletions

View File

@@ -14,7 +14,7 @@ interface InfoFlyoutProps {
onClose: () => void;
title: string;
children: React.ReactNode;
anchorRef: React.RefObject<HTMLElement | null>;
anchorRef: React.RefObject<HTMLElement>;
}
function InfoFlyout({ isOpen, onClose, title, children, anchorRef }: InfoFlyoutProps) {
@@ -104,7 +104,7 @@ function InfoFlyout({ isOpen, onClose, title, children, anchorRef }: InfoFlyoutP
);
}
function InfoButton({ onClick, buttonRef }: { onClick: () => void; buttonRef: React.RefObject<HTMLButtonElement> }) {
function InfoButton({ onClick, buttonRef }: { onClick: () => void; buttonRef: React.Ref<HTMLButtonElement> }) {
return (
<button
ref={buttonRef}
@@ -248,7 +248,7 @@ export function LeagueDropSection({
const dropPolicy = form.dropPolicy || { strategy: 'none' as const };
const [showDropFlyout, setShowDropFlyout] = useState(false);
const [activeDropRuleFlyout, setActiveDropRuleFlyout] = useState<DropStrategy | null>(null);
const dropInfoRef = useRef<HTMLButtonElement>(null);
const dropInfoRef = useRef<HTMLButtonElement>(null!);
const dropRuleRefs = useRef<Record<DropStrategy, HTMLButtonElement | null>>({
none: null,
bestNResults: null,
@@ -421,7 +421,7 @@ export function LeagueDropSection({
isOpen={activeDropRuleFlyout === option.value}
onClose={() => setActiveDropRuleFlyout(null)}
title={ruleInfo.title}
anchorRef={{ current: dropRuleRefs.current[option.value] }}
anchorRef={{ current: dropRuleRefs.current[option.value] ?? dropInfoRef.current }}
>
<div className="space-y-4">
<p className="text-xs text-gray-400">{ruleInfo.description}</p>