blob: c3ac8d63c02ba919ae6f34ed131325eba8909ccf [file] [log] [blame]
ybtda5978b2025-05-31 15:58:05 +08001import React from 'react';
2import { Button, Divider, List, Typography, Space, Tag } from 'antd';
3import { CloudDownloadOutlined } from '@ant-design/icons';
ybt3ec62e42025-06-11 22:46:22 +08004import { useNavigate } from 'react-router-dom';
ybtda5978b2025-05-31 15:58:05 +08005
6const { Title, Paragraph, Text } = Typography;
7
ybt3ec62e42025-06-11 22:46:22 +08008const HomePage = () => {
9 const navigate = useNavigate();
10
11 return (
ybtda5978b2025-05-31 15:58:05 +080012 <div className="space-y-6">
13 <div className="text-center py-8">
14 <Title level={1}>欢迎来到 PT 网站</Title>
15 <Paragraph className="text-lg text-slate-500">
16 高清资源分享,互助共赢的PT资源社区
17 </Paragraph>
ybt3ec62e42025-06-11 22:46:22 +080018 <Button type="primary" size="large" icon={<CloudDownloadOutlined />} onClick={() => navigate('/torrents')}>
ybtda5978b2025-05-31 15:58:05 +080019 浏览资源
20 </Button>
21 </div>
22
23 <Divider>最新公告</Divider>
24
25 <List
26 itemLayout="horizontal"
27 dataSource={[
28 {
ybt3ec62e42025-06-11 22:46:22 +080029 content: '暂无公告',
ybtda5978b2025-05-31 15:58:05 +080030 }
31 ]}
32 renderItem={(item) => (
33 <List.Item>
34 <List.Item.Meta
35 title={<Space><Text strong>{item.title}</Text><Tag color="blue">{item.date}</Tag></Space>}
36 description={item.content}
37 />
38 </List.Item>
39 )}
40 />
41 </div>
ybt3ec62e42025-06-11 22:46:22 +080042 )
43};
ybtda5978b2025-05-31 15:58:05 +080044
45export default HomePage;