This repository was archived by the owner on Jul 22, 2020. It is now read-only.
File tree 4 files changed +19
-4
lines changed
4 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ const ProgramDetails = ({programAccounts}: {programAccounts: Object}) => {
15
15
</ TableCell >
16
16
< TableCell >
17
17
< ValidatorName
18
+ to = { `/accounts/${ account . pubkey } ` }
18
19
pubkey = { account . pubkey }
19
20
name = { account . pubkey }
20
21
avatar = ""
Original file line number Diff line number Diff line change @@ -16,10 +16,16 @@ type TProgram = {
16
16
17
17
const Program = ( { id, accounts} : TProgram ) => {
18
18
const classes = useStyles ( ) ;
19
+
19
20
const renderAccount = ( account , i ) => (
20
- < div className = { classes . account } >
21
+ < div className = { classes . account } key = { account } >
21
22
< Label text = { `Account ${ i + 1 } ` } hint = "" />
22
- < ValidatorName pubkey = { id } name = { account } avatar = "" />
23
+ < ValidatorName
24
+ to = { `/accounts/${ account } ` }
25
+ pubkey = { id }
26
+ name = { account }
27
+ avatar = ""
28
+ />
23
29
</ div >
24
30
) ;
25
31
return (
Original file line number Diff line number Diff line change @@ -6,7 +6,13 @@ import Program from './Program';
6
6
7
7
const ProgramsTab = ( { transaction} : { transaction : Object } ) => {
8
8
const renderProgram = instruction => {
9
- return < Program id = { instruction . programId } accounts = { instruction . keys } /> ;
9
+ return (
10
+ < Program
11
+ key = { instruction . programId }
12
+ id = { instruction . programId }
13
+ accounts = { instruction . keys }
14
+ />
15
+ ) ;
10
16
} ;
11
17
return < div > { map ( renderProgram ) ( transaction . instructions ) } </ div > ;
12
18
} ;
Original file line number Diff line number Diff line change @@ -9,15 +9,17 @@ const ValidatorName = ({
9
9
pubkey,
10
10
name,
11
11
avatar,
12
+ to,
12
13
} : {
13
14
pubkey : string ,
14
15
name : string ,
15
16
avatar : string ,
17
+ to ?: string ,
16
18
} ) => {
17
19
const classes = useStyles ( ) ;
18
20
return (
19
21
< div >
20
- < Link to = { `/validators/${ pubkey } ` } className = { classes . root } >
22
+ < Link to = { to || `/validators/${ pubkey } ` } className = { classes . root } >
21
23
< Avatar pubkey = { pubkey } avatarUrl = { avatar } />
22
24
< div > { name || pubkey } </ div >
23
25
</ Link >
You can’t perform that action at this time.
0 commit comments