@@ -2,6 +2,7 @@ import React, { useState, useEffect, useCallback, useMemo } from 'react'
22import { RouteComponentProps } from 'react-router-dom'
33import { useTranslation } from 'react-i18next'
44import { Stack , Text , DefaultButton , Icon , TooltipHost , Spinner } from 'office-ui-fabric-react'
5+ import PropertyList from 'widgets/PropertyList'
56
67import appState from 'states/initStates/app'
78import { AppActions , StateWithDispatch } from 'states/stateProvider/reducer'
@@ -282,6 +283,17 @@ const NervosDAO = ({
282283 )
283284 } , [ epoch ] )
284285
286+ const lockAndFreeProperties = [
287+ {
288+ label : t ( 'nervos-dao.free' ) ,
289+ value : `${ shannonToCKBFormatter ( `${ free } ` ) } CKB` ,
290+ } ,
291+ {
292+ label : t ( 'nervos-dao.locked' ) ,
293+ value : `${ shannonToCKBFormatter ( `${ locked } ` ) } CKB` ,
294+ } ,
295+ ]
296+
285297 return (
286298 < >
287299 < Stack tokens = { { childrenGap : 15 } } horizontalAlign = "stretch" >
@@ -290,14 +302,7 @@ const NervosDAO = ({
290302 </ Text >
291303 < Stack horizontal tokens = { { childrenGap : 15 } } >
292304 < Stack style = { { minWidth : '250px' } } tokens = { { childrenGap : 10 } } >
293- < Stack horizontalAlign = "space-between" horizontal >
294- < Text > { `${ t ( 'nervos-dao.free' ) } : ` } </ Text >
295- < Text > { `${ shannonToCKBFormatter ( `${ free } ` ) } CKB` } </ Text >
296- </ Stack >
297- < Stack horizontalAlign = "space-between" horizontal >
298- < Text > { `${ t ( 'nervos-dao.locked' ) } : ` } </ Text >
299- < Text > { `${ shannonToCKBFormatter ( `${ locked } ` ) } CKB` } </ Text >
300- </ Stack >
305+ < PropertyList properties = { lockAndFreeProperties } />
301306 </ Stack >
302307 < Stack horizontal verticalAlign = "center" tokens = { { childrenGap : 15 } } >
303308 < DefaultButton
0 commit comments