fix: error
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { VideoPlayer } from '@/components/video/video-player';
|
||||
import { FullscreenMediaModal } from '@/components/media/fullscreen-media-modal';
|
||||
import { VideoPlayer } from '@/components/video/video-player';
|
||||
import { useThemeColor } from '@/hooks/use-theme-color';
|
||||
import { Template } from '@/lib/types/template';
|
||||
import { isVideoTemplate } from '@/utils/media-utils';
|
||||
import { ResizeMode } from 'expo-av';
|
||||
import { Image } from 'expo-image';
|
||||
import { useRouter } from 'expo-router';
|
||||
@@ -9,7 +10,6 @@ import { useMemo, useState } from 'react';
|
||||
import { Platform, StyleSheet, TouchableOpacity, View } from 'react-native';
|
||||
import { ThemedText } from '../themed-text';
|
||||
import { ThemedView } from '../themed-view';
|
||||
import { isVideoTemplate, canLoadMedia } from '@/utils/media-utils';
|
||||
|
||||
interface TemplateCardProps {
|
||||
template: Template;
|
||||
@@ -109,7 +109,7 @@ export function TemplateCard({
|
||||
)}
|
||||
|
||||
{template.category && (
|
||||
<View style={styles.watermark}>
|
||||
<View style={styles.watermark} className='template-category'>
|
||||
<View style={styles.categoryBadge}>
|
||||
<ThemedText style={styles.categoryText}>
|
||||
{template.category.name}
|
||||
@@ -119,7 +119,7 @@ export function TemplateCard({
|
||||
)}
|
||||
|
||||
{template.tags.length > 0 && (
|
||||
<View style={styles.tagOverlay}>
|
||||
<View style={styles.tagOverlay} className='template-tags'>
|
||||
{template.tags.slice(0, 2).map((tag) => (
|
||||
<View key={tag.id} style={styles.tagBadge}>
|
||||
<ThemedText style={styles.tagText}>
|
||||
@@ -131,7 +131,6 @@ export function TemplateCard({
|
||||
)}
|
||||
</ThemedView>
|
||||
</View>
|
||||
|
||||
{/* 操作按钮区域 */}
|
||||
<View style={styles.actionArea}>
|
||||
<ThemedText style={styles.templateTitle} numberOfLines={1}>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { StyleSheet, FlatList, ActivityIndicator, RefreshControl, View } from 'react-native';
|
||||
import { useThemeColor } from '@/hooks/use-theme-color';
|
||||
import { Template } from '@/lib/types/template';
|
||||
import { ActivityIndicator, FlatList, RefreshControl, StyleSheet, View } from 'react-native';
|
||||
import { ThemedText } from '../themed-text';
|
||||
import { ThemedView } from '../themed-view';
|
||||
import { Template } from '@/lib/types/template';
|
||||
import { TemplateCard } from './template-card';
|
||||
import { useThemeColor } from '@/hooks/use-theme-color';
|
||||
|
||||
interface TemplateListProps {
|
||||
templates: Template[];
|
||||
|
||||
Reference in New Issue
Block a user