some changes
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user