Skip to content

Commit 5d0672b

Browse files
committed
✨ feat: 添加舞蹈市场按钮 & 优化 dynamic 引入 panel
1 parent 5a2178c commit 5d0672b

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

src/app/chat/Apps.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
import { DancePanel, MarketPanel } from '@/panels';
1+
import dynamic from 'next/dynamic';
2+
23
import { useGlobalStore } from '@/store/global';
34
import { PanelKey } from '@/types/config';
45

6+
const DancePanel = dynamic(() => import('@/panels/DancePanel'));
7+
const MarketPanel = dynamic(() => import('@/panels/MarketPanel'));
8+
59
export const apps = [
610
{
711
component: <DancePanel />,

src/features/DanceList/index.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ActionIcon } from '@lobehub/ui';
1+
import { ActionIcon, GradientButton } from '@lobehub/ui';
22
import { Empty } from 'antd';
33
import { createStyles } from 'antd-style';
44
import classNames from 'classnames';
@@ -66,7 +66,17 @@ const DanceList = (props: PlayListProps) => {
6666
return <DanceItem danceItem={item} key={item.danceId} />;
6767
})}
6868
{danceList.length === 0 ? (
69-
<Empty description={t('dance.noPlayList')} image={Empty.PRESENTED_IMAGE_SIMPLE}></Empty>
69+
<Empty description={t('dance.noPlayList')} image={Empty.PRESENTED_IMAGE_SIMPLE}>
70+
<GradientButton
71+
glow
72+
size="middle"
73+
onClick={() => {
74+
openPanel('dance');
75+
}}
76+
>
77+
{t('dance.musicAndDance')}
78+
</GradientButton>
79+
</Empty>
7080
) : null}
7181
</Flexbox>
7282
</Flexbox>

0 commit comments

Comments
 (0)