fix website build
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user