feat: 首页更新
This commit is contained in:
@@ -15,7 +15,7 @@ import {
|
||||
Image,
|
||||
} from 'react-native';
|
||||
import { createThemeStyles } from '@/theme';
|
||||
import Colors from '@/constants/Colors';
|
||||
import { useColorScheme } from '@/hooks';
|
||||
import { mockHighPrizeGames } from '@/services/mockHomeService';
|
||||
import type { HighPrizeGame as HighPrizeGameType } from '@/types/home';
|
||||
|
||||
@@ -85,7 +85,6 @@ const styles = createThemeStyles((colors) => ({
|
||||
}));
|
||||
|
||||
interface HighPrizeGameProps {
|
||||
theme: 'light' | 'dark';
|
||||
games?: HighPrizeGameType[];
|
||||
onGamePress?: (game: HighPrizeGameType) => void;
|
||||
}
|
||||
@@ -93,8 +92,9 @@ interface HighPrizeGameProps {
|
||||
/**
|
||||
* 高奖金游戏组件
|
||||
*/
|
||||
export default function HighPrizeGame({ theme, games: propGames, onGamePress }: HighPrizeGameProps) {
|
||||
const s = styles[theme];
|
||||
export default function HighPrizeGame({ games: propGames, onGamePress }: HighPrizeGameProps) {
|
||||
const colorScheme = useColorScheme();
|
||||
const s = styles[colorScheme];
|
||||
const [games, setGames] = useState<HighPrizeGameType[]>(propGames || []);
|
||||
const [selectedId, setSelectedId] = useState<string | null>(null);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user