empty placeholder
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { EmptyPlaceholder } from "@/components/empty-placeholder";
|
||||
import { ThemedText } from "@/components/themed-text";
|
||||
import { IconSymbol } from "@/components/ui/icon-symbol";
|
||||
import { LiveScoreMatch } from "@/types/api";
|
||||
@@ -23,15 +24,13 @@ export function LiveLeagueInfo({ match }: LiveLeagueInfoProps) {
|
||||
activeOpacity={0.7}
|
||||
>
|
||||
<View style={styles.left}>
|
||||
{match.league_logo ? (
|
||||
{match.league_logo && match.league_logo.trim() !== "" && !match.league_logo.includes("placehold") ? (
|
||||
<Image
|
||||
source={{ uri: match.league_logo }}
|
||||
style={styles.leagueLogo}
|
||||
/>
|
||||
) : (
|
||||
<View style={[styles.fallbackLogo, { backgroundColor: "#333" }]}>
|
||||
<IconSymbol name="trophy-outline" size={14} color="#AAA" />
|
||||
</View>
|
||||
<EmptyPlaceholder type="league" size={24} />
|
||||
)}
|
||||
<ThemedText style={[styles.leagueName, { color: textColor }]}>
|
||||
{match.league_name}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { EmptyPlaceholder } from "@/components/empty-placeholder";
|
||||
import { ThemedText } from "@/components/themed-text";
|
||||
import { IconSymbol } from "@/components/ui/icon-symbol";
|
||||
import { addFavorite, checkFavorite, removeFavorite } from "@/lib/api";
|
||||
@@ -265,10 +266,14 @@ export function LiveScoreHeader({ match, topInset }: LiveScoreHeaderProps) {
|
||||
/>
|
||||
</TouchableOpacity>
|
||||
<View style={styles.logoContainer}>
|
||||
<Image
|
||||
source={{ uri: homeLogo }}
|
||||
style={[styles.teamLogo, isTennis && styles.tennisAvatar]}
|
||||
/>
|
||||
{homeLogo && homeLogo.trim() !== "" && !homeLogo.includes("placehold") ? (
|
||||
<Image
|
||||
source={{ uri: homeLogo }}
|
||||
style={[styles.teamLogo, isTennis && styles.tennisAvatar]}
|
||||
/>
|
||||
) : (
|
||||
<EmptyPlaceholder type={isTennis ? "player" : "team"} size={60} />
|
||||
)}
|
||||
</View>
|
||||
</View>
|
||||
<ThemedText style={styles.teamName} numberOfLines={2}>
|
||||
@@ -318,10 +323,14 @@ export function LiveScoreHeader({ match, topInset }: LiveScoreHeaderProps) {
|
||||
<View style={styles.teamInfo}>
|
||||
<View style={styles.teamLogoRow}>
|
||||
<View style={styles.logoContainer}>
|
||||
<Image
|
||||
source={{ uri: awayLogo }}
|
||||
style={[styles.teamLogo, isTennis && styles.tennisAvatar]}
|
||||
/>
|
||||
{awayLogo && awayLogo.trim() !== "" && !awayLogo.includes("placehold") ? (
|
||||
<Image
|
||||
source={{ uri: awayLogo }}
|
||||
style={[styles.teamLogo, isTennis && styles.tennisAvatar]}
|
||||
/>
|
||||
) : (
|
||||
<EmptyPlaceholder type={isTennis ? "player" : "team"} size={60} />
|
||||
)}
|
||||
</View>
|
||||
<TouchableOpacity
|
||||
onPress={() => toggleTeamFavorite(match.away_team_key, false)}
|
||||
|
||||
Reference in New Issue
Block a user