xref: /MusicFree/src/pages/topListDetail/index.tsx (revision d384662f7d26e797b999304aa17a0bda98b34ca4)
1*d384662fS猫头猫import React from 'react';
2*d384662fS猫头猫import {StyleSheet} from 'react-native';
3*d384662fS猫头猫import rpx from '@/utils/rpx';
4*d384662fS猫头猫import NavBar from './components/navBar';
5*d384662fS猫头猫import MusicBar from '@/components/musicBar';
6*d384662fS猫头猫import TopListMusicList from './components/albumMusicList';
7*d384662fS猫头猫import useTopListDetail from './hooks/useTopListDetail';
8*d384662fS猫头猫import StatusBar from '@/components/base/statusBar';
9*d384662fS猫头猫import {SafeAreaView} from 'react-native-safe-area-context';
10*d384662fS猫头猫import {useParams} from '@/entry/router';
11*d384662fS猫头猫
12*d384662fS猫头猫export default function TopListDetail() {
13*d384662fS猫头猫    const {pluginHash, topList} = useParams<'top-list-detail'>();
14*d384662fS猫头猫    const topListDetail = useTopListDetail(topList, pluginHash);
15*d384662fS猫头猫
16*d384662fS猫头猫    return (
17*d384662fS猫头猫        <SafeAreaView style={style.wrapper}>
18*d384662fS猫头猫            <StatusBar />
19*d384662fS猫头猫            <NavBar musicList={topListDetail?.musicList ?? []} />
20*d384662fS猫头猫            <TopListMusicList
21*d384662fS猫头猫                topListDetail={topListDetail}
22*d384662fS猫头猫                musicList={topListDetail?.musicList}
23*d384662fS猫头猫            />
24*d384662fS猫头猫            <MusicBar />
25*d384662fS猫头猫        </SafeAreaView>
26*d384662fS猫头猫    );
27*d384662fS猫头猫}
28*d384662fS猫头猫
29*d384662fS猫头猫const style = StyleSheet.create({
30*d384662fS猫头猫    wrapper: {
31*d384662fS猫头猫        width: rpx(750),
32*d384662fS猫头猫        flex: 1,
33*d384662fS猫头猫    },
34*d384662fS猫头猫});
35