11import { observer } from 'mobx-react' ;
22import { FC , useContext } from 'react' ;
3- import { Card , Col , Container , Ratio , Row } from 'react-bootstrap' ;
3+ import { Card , Col , Container , Row } from 'react-bootstrap' ;
44
55import { PageHead } from '../components/Layout/PageHead' ;
66import { I18nContext } from '../models/Translation' ;
77import styles from '../styles/Bounty.module.less' ;
88
9- interface BountyViewProps {
10- title : string ;
11- url : string ;
12- icon : string ;
13- colspan ?: number ;
14- }
9+ type BountyViewProps = Record < 'icon' | 'title' | 'url' , string > ;
1510
16- const BountyView : FC < BountyViewProps > = ( { title, url, icon, colspan = 6 } ) => (
17- < Col md = { colspan } >
18- < Card className = { styles . bountyCard } body >
19- < Card . Title as = "h2" className = { `fs-5 ${ styles . cardTitle } ` } >
20- { icon } { title }
21- </ Card . Title >
22- < Ratio aspectRatio = "4x3" className = { styles . iframeContainer } >
23- < iframe
24- src = { url }
25- className = { styles . bountyIframe }
26- title = { title }
27- allow = "clipboard-read; clipboard-write"
28- />
29- </ Ratio >
30- </ Card >
31- </ Col >
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 >
3223) ;
3324
3425const BountyPage : FC = observer ( ( ) => {
@@ -38,82 +29,71 @@ const BountyPage: FC = observer(() => {
3829 < >
3930 < PageHead title = { t ( 'bounty_page_title' ) } />
4031
41- { /* Hero Section */ }
4232 < section className = { styles . hero } >
4333 < Container >
4434 < h1 className = { `text-center ${ styles . title } ` } > { t ( 'bounty_page_title' ) } </ h1 >
4535 < p className = { `text-center ${ styles . description } ` } > { t ( 'bounty_page_description' ) } </ p >
4636 </ Container >
4737 </ section >
4838
49- < Container className = "my-5" >
50- { /* Dashboard - full width */ }
51- < Row className = "g-4 mb-4" >
52- < BountyView
53- title = { t ( 'bounty_dashboard' ) }
54- url = "https://open-source-bazaar.feishu.cn/share/base/dashboard/shrcnt4EaAxn3zx9faRarERgEqf"
55- icon = "📊"
56- colspan = { 12 }
57- />
58- </ Row >
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+ />
5945
60- { /* Task Rank and Submission Form - same row */ }
61- < Row className = "g-4 mb-4" >
62- < BountyView
63- title = { t ( 'bounty_task_rank' ) }
64- url = "https://open-source-bazaar.feishu.cn/share/base/view/shrcnUVgb8E73UthaB2Tk4glnSb"
65- icon = "📋"
66- />
67- < BountyView
68- title = { t ( 'bounty_task_submission' ) }
69- url = "https://open-source-bazaar.feishu.cn/share/base/form/shrcn2Ss97TSu3XgPi7mbZbrXLe"
70- icon = "📝"
71- />
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 >
7261 </ Row >
7362
74- { /* Achievement Rank and Submission Form - same row */ }
75- < Row className = "g-4 mb-4" >
76- < BountyView
77- title = { t ( 'bounty_achievement_rank' ) }
78- url = "https://open-source-bazaar.feishu.cn/share/base/view/shrcne4IY9mYAfoo9a69oxyAdTb"
79- icon = "🏆"
80- />
81- < BountyView
82- title = { t ( 'bounty_achievement_submission' ) }
83- url = "https://open-source-bazaar.feishu.cn/share/base/form/shrcn7yHGIOnPNjdZck3eBaiMVc"
84- icon = "✅"
85- />
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 >
8678 </ Row >
8779
88- { /* Token Rank - full width */ }
89- < Row className = "g-4 mb-4" >
90- < BountyView
91- title = { t ( 'bounty_token_rank' ) }
92- url = "https://open-source-bazaar.feishu.cn/share/base/view/shrcn6QBgImHEjFH5qDf5tjmrzb"
93- icon = "🪙"
94- colspan = { 12 }
95- />
96- </ Row >
80+ < BountyView
81+ icon = "🪙"
82+ title = { t ( 'bounty_token_rank' ) }
83+ url = "https://open-source-bazaar.feishu.cn/share/base/view/shrcn6QBgImHEjFH5qDf5tjmrzb"
84+ />
9785
98- { /* Hero Rank - full width */ }
99- < Row className = "g-4 mb-4" >
100- < BountyView
101- title = { t ( 'bounty_hero_rank' ) }
102- url = "https://open-source-bazaar.feishu.cn/share/base/view/shrcnyrOkRfqSAjWEjCQ9T4OOwc"
103- icon = "🦸"
104- colspan = { 12 }
105- />
106- </ Row >
86+ < BountyView
87+ icon = "🦸"
88+ title = { t ( 'bounty_hero_rank' ) }
89+ url = "https://open-source-bazaar.feishu.cn/share/base/view/shrcnyrOkRfqSAjWEjCQ9T4OOwc"
90+ />
10791
108- { /* Debt Rank - full width */ }
109- < Row className = "g-4 mb-4" >
110- < BountyView
111- title = { t ( 'bounty_debt_rank' ) }
112- url = "https://open-source-bazaar.feishu.cn/share/base/view/shrcnImOzkBXW3okKp3nLskPMgd"
113- icon = "💳"
114- colspan = { 12 }
115- />
116- </ Row >
92+ < BountyView
93+ icon = "💳"
94+ title = { t ( 'bounty_debt_rank' ) }
95+ url = "https://open-source-bazaar.feishu.cn/share/base/view/shrcnImOzkBXW3okKp3nLskPMgd"
96+ />
11797 </ Container >
11898 </ >
11999 ) ;
0 commit comments