@@ -55,12 +55,13 @@ const styles = ({ spacing, breakpoints }: Theme) =>
55
55
interface IProps extends WithStyles < typeof styles > {
56
56
jobRunId ?: string
57
57
jobRun ?: IJobRun
58
+ etherscanHost ?: string
58
59
getJobRun : Function
59
60
path : string
60
61
}
61
62
62
63
const Show = withStyles ( styles ) (
63
- ( { jobRunId, jobRun, getJobRun, classes } : IProps ) => {
64
+ ( { jobRunId, jobRun, getJobRun, classes, etherscanHost } : IProps ) => {
64
65
useEffect ( ( ) => {
65
66
getJobRun ( jobRunId )
66
67
} , [ ] )
@@ -79,7 +80,14 @@ const Show = withStyles(styles)(
79
80
80
81
< div className = { classes . container } >
81
82
< Card className = { classes . card } >
82
- { jobRun ? < Details jobRun = { jobRun } /> : < Loading /> }
83
+ { jobRun && etherscanHost ? (
84
+ < Details
85
+ jobRun = { jobRun }
86
+ etherscanHost = { etherscanHost . toString ( ) }
87
+ />
88
+ ) : (
89
+ < Loading />
90
+ ) }
83
91
</ Card >
84
92
</ div >
85
93
</ Grid >
@@ -103,13 +111,19 @@ const jobRunSelector = (
103
111
}
104
112
}
105
113
114
+ const etherscanHostSelector = ( { config } : IState ) => {
115
+ return config . etherscanHost
116
+ }
117
+
106
118
interface IOwnProps {
107
119
jobRunId ?: string
108
120
}
109
121
110
122
const mapStateToProps = ( state : IState , { jobRunId } : IOwnProps ) => {
111
123
const jobRun = jobRunSelector ( state , jobRunId )
112
- return { jobRun }
124
+ const etherscanHost = etherscanHostSelector ( state )
125
+
126
+ return { jobRun, etherscanHost }
113
127
}
114
128
115
129
const mapDispatchToProps = ( dispatch : Dispatch < any > ) =>
0 commit comments