mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-04 18:52:56 +00:00
dev day #71
This commit is contained in:
@@ -10,7 +10,6 @@ import {
|
||||
Button,
|
||||
HStack,
|
||||
VStack,
|
||||
Image,
|
||||
Text,
|
||||
Badge,
|
||||
Link,
|
||||
@@ -18,6 +17,7 @@ import {
|
||||
} from '@chakra-ui/react';
|
||||
import { useCountdown } from '../../hooks/useCountdown';
|
||||
import { assetUrl, sanitizeClubName } from '../../utils/url';
|
||||
import { TeamLogo } from '../common/TeamLogo';
|
||||
|
||||
export type FacrMatchLike = {
|
||||
id?: string | number;
|
||||
@@ -28,6 +28,8 @@ export type FacrMatchLike = {
|
||||
away?: string;
|
||||
home_logo_url?: string;
|
||||
away_logo_url?: string;
|
||||
home_id?: string;
|
||||
away_id?: string;
|
||||
competition?: string;
|
||||
competitionName?: string;
|
||||
venue?: string;
|
||||
@@ -112,7 +114,15 @@ export const MatchModal: React.FC<MatchModalProps> = ({ isOpen, match, onClose,
|
||||
role={onTeamClick ? 'button' : undefined}
|
||||
tabIndex={onTeamClick ? 0 : undefined}
|
||||
>
|
||||
<Image src={assetUrl(match.home_logo_url) || '/logo192.png'} alt={match.home || 'Domácí'} boxSize="56px" objectFit="contain" />
|
||||
<TeamLogo
|
||||
teamId={match.home_id}
|
||||
teamName={match.home}
|
||||
facrLogo={match.home_logo_url}
|
||||
size="custom"
|
||||
alt={match.home || 'Domácí'}
|
||||
boxSize="56px"
|
||||
borderRadius="full"
|
||||
/>
|
||||
<Text fontWeight="semibold" noOfLines={1} textAlign="center">{sanitizeClubName(match.home) || 'Domácí'}</Text>
|
||||
</VStack>
|
||||
<VStack spacing={1} minW="120px">
|
||||
@@ -157,7 +167,15 @@ export const MatchModal: React.FC<MatchModalProps> = ({ isOpen, match, onClose,
|
||||
role={onTeamClick ? 'button' : undefined}
|
||||
tabIndex={onTeamClick ? 0 : undefined}
|
||||
>
|
||||
<Image src={assetUrl(match.away_logo_url) || '/logo192.png'} alt={match.away || 'Hosté'} boxSize="56px" objectFit="contain" />
|
||||
<TeamLogo
|
||||
teamId={match.away_id}
|
||||
teamName={match.away}
|
||||
facrLogo={match.away_logo_url}
|
||||
size="custom"
|
||||
alt={match.away || 'Hosté'}
|
||||
boxSize="56px"
|
||||
borderRadius="full"
|
||||
/>
|
||||
<Text fontWeight="semibold" noOfLines={1} textAlign="center">{sanitizeClubName(match.away) || 'Hosté'}</Text>
|
||||
</VStack>
|
||||
</HStack>
|
||||
|
||||
Reference in New Issue
Block a user