xref: /MusicFree/src/pages/topListDetail/index.tsx (revision 15900d057ad4df766b2f9ea5b48f92a8ce2664db)
1import React from 'react';
2import useTopListDetail from './hooks/useTopListDetail';
3import {useParams} from '@/entry/router';
4import MusicSheetPage from '@/components/musicSheetPage';
5import {RequestStateCode} from '@/constants/commonConst';
6
7export default function TopListDetail() {
8    const {pluginHash, topList} = useParams<'top-list-detail'>();
9    const [topListDetail, state, loadMore] = useTopListDetail(
10        topList,
11        pluginHash,
12    );
13
14    return (
15        <MusicSheetPage
16            navTitle="榜单"
17            sheetInfo={topListDetail}
18            onEndReached={loadMore}
19            loadMore={state & RequestStateCode.LOADING ? 'loading' : 'done'}
20        />
21    );
22}
23