|
| 1 | +import { observer } from 'mobx-react'; |
| 2 | +import { FC, useContext } from 'react'; |
| 3 | +import { Card, Col, Container, Row } from 'react-bootstrap'; |
| 4 | + |
| 5 | +import { PageHead } from '../components/Layout/PageHead'; |
| 6 | +import { I18nContext } from '../models/Translation'; |
| 7 | +import styles from '../styles/Bounty.module.less'; |
| 8 | + |
| 9 | +type BountyViewProps = Record<'icon' | 'title' | 'url', string>; |
| 10 | + |
| 11 | +const BountyView: FC<BountyViewProps> = ({ title, url, icon }) => ( |
| 12 | + <Card className={`${styles.bountyCard} rounded-4`} body> |
| 13 | + <Card.Title as="h2" className="fs-5"> |
| 14 | + {icon} <span className={styles.cardTitle}>{title}</span> |
| 15 | + </Card.Title> |
| 16 | + <div |
| 17 | + className={`${styles.iframeContainer} overflow-hidden w-100 rounded-4 position-relative`} |
| 18 | + style={{ height: 'calc(100vh - 10rem)' }} |
| 19 | + > |
| 20 | + <iframe className="border-0 h-100 w-100 rounded-4" title={title} loading="lazy" src={url} /> |
| 21 | + </div> |
| 22 | + </Card> |
| 23 | +); |
| 24 | + |
| 25 | +const BountyPage: FC = observer(() => { |
| 26 | + const { t } = useContext(I18nContext); |
| 27 | + |
| 28 | + return ( |
| 29 | + <> |
| 30 | + <PageHead title={t('bounty_page_title')} /> |
| 31 | + |
| 32 | + <section className={styles.hero}> |
| 33 | + <Container> |
| 34 | + <h1 className={`text-center ${styles.title}`}>{t('bounty_page_title')}</h1> |
| 35 | + <p className={`text-center ${styles.description}`}>{t('bounty_page_description')}</p> |
| 36 | + </Container> |
| 37 | + </section> |
| 38 | + |
| 39 | + <Container className="my-5 d-flex flex-column gap-4"> |
| 40 | + <BountyView |
| 41 | + title={t('bounty_dashboard')} |
| 42 | + url="https://open-source-bazaar.feishu.cn/share/base/dashboard/shrcnt4EaAxn3zx9faRarERgEqf" |
| 43 | + icon="📊" |
| 44 | + /> |
| 45 | + |
| 46 | + <Row className="g-4"> |
| 47 | + <Col xs={12} lg={8}> |
| 48 | + <BountyView |
| 49 | + icon="📋" |
| 50 | + title={t('bounty_task_rank')} |
| 51 | + url="https://open-source-bazaar.feishu.cn/share/base/view/shrcnUVgb8E73UthaB2Tk4glnSb" |
| 52 | + /> |
| 53 | + </Col> |
| 54 | + <Col xs={12} lg={4}> |
| 55 | + <BountyView |
| 56 | + icon="📝" |
| 57 | + title={t('bounty_task_submission')} |
| 58 | + url="https://open-source-bazaar.feishu.cn/share/base/form/shrcn2Ss97TSu3XgPi7mbZbrXLe" |
| 59 | + /> |
| 60 | + </Col> |
| 61 | + </Row> |
| 62 | + |
| 63 | + <Row className="g-4"> |
| 64 | + <Col xs={12} lg={8}> |
| 65 | + <BountyView |
| 66 | + icon="🏆" |
| 67 | + title={t('bounty_achievement_rank')} |
| 68 | + url="https://open-source-bazaar.feishu.cn/share/base/view/shrcne4IY9mYAfoo9a69oxyAdTb" |
| 69 | + /> |
| 70 | + </Col> |
| 71 | + <Col xs={12} lg={4}> |
| 72 | + <BountyView |
| 73 | + icon="✅" |
| 74 | + title={t('bounty_achievement_submission')} |
| 75 | + url="https://open-source-bazaar.feishu.cn/share/base/form/shrcn7yHGIOnPNjdZck3eBaiMVc" |
| 76 | + /> |
| 77 | + </Col> |
| 78 | + </Row> |
| 79 | + |
| 80 | + <BountyView |
| 81 | + icon="🪙" |
| 82 | + title={t('bounty_token_rank')} |
| 83 | + url="https://open-source-bazaar.feishu.cn/share/base/view/shrcn6QBgImHEjFH5qDf5tjmrzb" |
| 84 | + /> |
| 85 | + |
| 86 | + <BountyView |
| 87 | + icon="🦸" |
| 88 | + title={t('bounty_hero_rank')} |
| 89 | + url="https://open-source-bazaar.feishu.cn/share/base/view/shrcnyrOkRfqSAjWEjCQ9T4OOwc" |
| 90 | + /> |
| 91 | + |
| 92 | + <BountyView |
| 93 | + icon="💳" |
| 94 | + title={t('bounty_debt_rank')} |
| 95 | + url="https://open-source-bazaar.feishu.cn/share/base/view/shrcnImOzkBXW3okKp3nLskPMgd" |
| 96 | + /> |
| 97 | + </Container> |
| 98 | + </> |
| 99 | + ); |
| 100 | +}); |
| 101 | + |
| 102 | +export default BountyPage; |
0 commit comments