xref: /MusicFree/src/pages/topListDetail/index.tsx (revision b4c389f44ac4dad056e7314478fadd2eca82a4b1)
1import React from 'react';
2import useTopListDetail from './hooks/useTopListDetail';
3import {useParams} from '@/core/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