Skip to content

Commit

Permalink
feat: add icp record config, show icp record
Browse files Browse the repository at this point in the history
  • Loading branch information
travis_joe committed Oct 30, 2019
1 parent a41d86f commit b9f2961
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
12 changes: 11 additions & 1 deletion src/components/footer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import React from 'react'
import './index.styl'
import { injectIntl } from 'react-intl'
import config from '../../utils/config'

class Footer extends React.Component<any, any> {
render() {
var intl = this.props.intl
Expand Down Expand Up @@ -69,10 +72,17 @@ class Footer extends React.Component<any, any> {
</div>
</div>
</div>
<div className="row vhCenter">
{config.icpRecordName && (
<a href={config.icpRecordUrl} target="_blank">
{config.icpRecordName}
</a>
)}
</div>
</div>
</div>
)
}
}
import { injectIntl } from 'react-intl'

export default injectIntl(Footer)
6 changes: 5 additions & 1 deletion src/utils/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ interface Config {
apiTimeout: number
apiTimeoutMsg: string
apiErrorMsg: string
icpRecordName?: string
icpRecordUrl?: string
}

const api: API = {
Expand Down Expand Up @@ -47,7 +49,9 @@ const config: Config = {
api: api,
apiTimeout: 15000,
apiTimeoutMsg: 'api timeout,try it later',
apiErrorMsg: 'network error!'
apiErrorMsg: 'network error!',
icpRecordName: '',
icpRecordUrl: ''
}

export { api }
Expand Down

0 comments on commit b9f2961

Please sign in to comment.