some changes

This commit is contained in:
yohlo
2025-09-11 13:35:33 -05:00
parent c74da09bde
commit 22be6682dd
18 changed files with 113 additions and 68 deletions

View File

@@ -7,13 +7,13 @@ import { Match } from "@/features/matches/types";
interface MatchCardProps {
match: Match;
orders: Record<number, number>;
onAnnounce?: (teamOne: any, teamTwo: any) => void;
onStartMatch?: (match: Match) => void;
}
export const MatchCard: React.FC<MatchCardProps> = ({
match,
orders,
onAnnounce,
onStartMatch,
}) => {
const homeSlot = useMemo(
() => ({
@@ -35,13 +35,13 @@ export const MatchCard: React.FC<MatchCardProps> = ({
);
const showToolbar = useMemo(
() => match.home && match.away && onAnnounce,
() => match.home && match.away && onStartMatch,
[match.home, match.away]
);
const handleAnnounce = useCallback(
() => onAnnounce?.(match.home, match.away),
[onAnnounce, match.home, match.away]
() => onStartMatch?.(match),
[onStartMatch, match]
);
const handleEdit = useCallback(() => {