-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathbounty.tsx
More file actions
104 lines (95 loc) · 2.96 KB
/
bounty.tsx
File metadata and controls
104 lines (95 loc) · 2.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
import { observer } from 'mobx-react';
import { FC, useContext } from 'react';
import { Card, Col, Container, Row } from 'react-bootstrap';
import { PageHead } from '../components/Layout/PageHead';
import { I18nContext } from '../models/Translation';
import styles from '../styles/Bounty.module.less';
interface BountyViewProps {
title: string;
url: string;
icon: string;
}
const BountyView: FC<BountyViewProps> = ({ title, url, icon }) => (
<Col md={6} lg={4}>
<Card className={styles.bountyCard}>
<Card.Body>
<h5 className={styles.cardTitle}>
{icon} {title}
</h5>
<div className={styles.iframeContainer}>
<iframe
src={url}
className={styles.bountyIframe}
title={title}
allow="clipboard-read; clipboard-write"
/>
</div>
</Card.Body>
</Card>
</Col>
);
const BountyPage: FC = observer(() => {
const { t } = useContext(I18nContext);
const bountyViews: BountyViewProps[] = [
{
title: t('bounty_dashboard'),
url: 'https://open-source-bazaar.feishu.cn/share/base/dashboard/shrcnt4EaAxn3zx9faRarERgEqf',
icon: '📊',
},
{
title: t('bounty_token_leaderboard'),
url: 'https://open-source-bazaar.feishu.cn/share/base/view/shrcn6QBgImHEjFH5qDf5tjmrzb',
icon: '🪙',
},
{
title: t('bounty_task_leaderboard'),
url: 'https://open-source-bazaar.feishu.cn/share/base/view/shrcnUVgb8E73UthaB2Tk4glnSb',
icon: '📋',
},
{
title: t('bounty_task_submission'),
url: 'https://open-source-bazaar.feishu.cn/share/base/form/shrcn2Ss97TSu3XgPi7mbZbrXLe',
icon: '📝',
},
{
title: t('bounty_achievement_leaderboard'),
url: 'https://open-source-bazaar.feishu.cn/share/base/view/shrcne4IY9mYAfoo9a69oxyAdTb',
icon: '🏆',
},
{
title: t('bounty_achievement_submission'),
url: 'https://open-source-bazaar.feishu.cn/share/base/form/shrcn7yHGIOnPNjdZck3eBaiMVc',
icon: '✅',
},
{
title: t('bounty_hero_leaderboard'),
url: 'https://open-source-bazaar.feishu.cn/share/base/view/shrcnyrOkRfqSAjWEjCQ9T4OOwc',
icon: '🦸',
},
{
title: t('bounty_debt_leaderboard'),
url: 'https://open-source-bazaar.feishu.cn/share/base/view/shrcnImOzkBXW3okKp3nLskPMgd',
icon: '💳',
},
];
return (
<>
<PageHead title={t('bounty_page_title')} />
{/* Hero Section */}
<section className={styles.hero}>
<Container>
<h1 className={`text-center ${styles.title}`}>{t('bounty_page_title')}</h1>
<p className={`text-center ${styles.description}`}>{t('bounty_page_description')}</p>
</Container>
</section>
<Container className="my-5">
<Row className="g-4">
{bountyViews.map(view => (
<BountyView key={view.url} {...view} />
))}
</Row>
</Container>
</>
);
});
export default BountyPage;