@@ -4,7 +4,7 @@ import Big from 'big.js';
4
4
import '../governance.less' ;
5
5
import 'antd/dist/antd.css' ;
6
6
// eslint-disable-next-line @typescript-eslint/no-unused-vars
7
- import { Layout , Radio , Button , Card , Progress , Form , InputNumber , Spin } from 'antd' ;
7
+ import { Layout , Radio , Button , Card , Progress , Form , InputNumber , Spin , Alert } from 'antd' ;
8
8
import { LoadingOutlined } from '@ant-design/icons' ;
9
9
import { useRecoilValue , useRecoilState } from 'recoil' ;
10
10
import { useTranslation } from 'react-i18next' ;
@@ -307,11 +307,22 @@ export const ProposalView = (props: any) => {
307
307
{ allProps ?. proposal ?. proposal_id }
308
308
</ div >
309
309
</ div >
310
-
310
+ { allProps . proposal ?. content ?. description . includes ( 'http' ) ?
311
+ < div className = "warning" >
312
+ < Alert
313
+ type = "warning"
314
+ message = { t ( 'governance.warning' ) }
315
+ showIcon
316
+ />
317
+ </ div >
318
+ : < > </ > }
311
319
< div className = "description" >
312
- { allProps . proposal ?. content ?. description ? allProps . proposal ?. content . description . split ( '\\n' ) . map ( ( p , i ) => (
313
- < p key = { i } > { p } </ p >
314
- ) ) : < p key = { 0 } > (No description)</ p > }
320
+ { allProps . proposal ?. content ?. description ?
321
+ allProps . proposal ?. content . description . split ( / \n | \\ n / ) . map ( ( p , i ) => (
322
+ < p key = { i } > { p } </ p >
323
+ ) )
324
+ : < p key = { 0 } > (No description)</ p >
325
+ }
315
326
</ div >
316
327
< div className = "item" >
317
328
{ allProps . proposal ?. status === ProposalStatuses . PROPOSAL_STATUS_VOTING_PERIOD ? (
0 commit comments