@@ -4,7 +4,7 @@ import Big from 'big.js';
44import '../governance.less' ;
55import 'antd/dist/antd.css' ;
66// 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' ;
88import { LoadingOutlined } from '@ant-design/icons' ;
99import { useRecoilValue , useRecoilState } from 'recoil' ;
1010import { useTranslation } from 'react-i18next' ;
@@ -307,11 +307,22 @@ export const ProposalView = (props: any) => {
307307 { allProps ?. proposal ?. proposal_id }
308308 </ div >
309309 </ 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+ : < > </ > }
311319 < 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+ }
315326 </ div >
316327 < div className = "item" >
317328 { allProps . proposal ?. status === ProposalStatuses . PROPOSAL_STATUS_VOTING_PERIOD ? (
0 commit comments