fix website build
This commit is contained in:
@@ -15,7 +15,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) {
|
||||
@@ -117,7 +117,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}
|
||||
@@ -533,8 +533,8 @@ export function ScoringPatternSection({
|
||||
const [showPointsFlyout, setShowPointsFlyout] = useState(false);
|
||||
const [showBonusFlyout, setShowBonusFlyout] = useState(false);
|
||||
const [activePresetFlyout, setActivePresetFlyout] = useState<string | null>(null);
|
||||
const pointsInfoRef = useRef<HTMLButtonElement>(null);
|
||||
const bonusInfoRef = useRef<HTMLButtonElement>(null);
|
||||
const pointsInfoRef = useRef<HTMLButtonElement>(null!);
|
||||
const bonusInfoRef = useRef<HTMLButtonElement>(null!);
|
||||
const presetInfoRefs = useRef<Record<string, HTMLElement | null>>({});
|
||||
|
||||
return (
|
||||
@@ -662,7 +662,7 @@ export function ScoringPatternSection({
|
||||
isOpen={activePresetFlyout === preset.id}
|
||||
onClose={() => setActivePresetFlyout(null)}
|
||||
title={presetInfo.title}
|
||||
anchorRef={{ current: presetInfoRefs.current[preset.id] ?? null }}
|
||||
anchorRef={{ current: presetInfoRefs.current[preset.id] ?? pointsInfoRef.current }}
|
||||
>
|
||||
<div className="space-y-4">
|
||||
<p className="text-xs text-gray-400">{presetInfo.description}</p>
|
||||
@@ -943,7 +943,7 @@ export function ChampionshipsSection({
|
||||
const isTeamsMode = form.structure.mode === 'fixedTeams';
|
||||
const [showChampFlyout, setShowChampFlyout] = useState(false);
|
||||
const [activeChampFlyout, setActiveChampFlyout] = useState<string | null>(null);
|
||||
const champInfoRef = useRef<HTMLButtonElement>(null);
|
||||
const champInfoRef = useRef<HTMLButtonElement>(null!);
|
||||
const champItemRefs = useRef<Record<string, HTMLElement | null>>({});
|
||||
|
||||
const updateChampionship = (key: keyof LeagueConfigFormModel['championships'], value: boolean) => {
|
||||
@@ -1121,7 +1121,7 @@ export function ChampionshipsSection({
|
||||
isOpen={activeChampFlyout === champ.key}
|
||||
onClose={() => setActiveChampFlyout(null)}
|
||||
title={champInfo.title}
|
||||
anchorRef={{ current: champItemRefs.current[champ.key] ?? null }}
|
||||
anchorRef={{ current: champItemRefs.current[champ.key] ?? champInfoRef.current }}
|
||||
>
|
||||
<div className="space-y-4">
|
||||
<p className="text-xs text-gray-400">{champInfo.description}</p>
|
||||
|
||||
Reference in New Issue
Block a user