From b9f29618d471f854da23a7034cc916274deb5149 Mon Sep 17 00:00:00 2001 From: travis_joe Date: Wed, 30 Oct 2019 17:52:02 +0800 Subject: [PATCH] feat: add icp record config, show icp record --- src/components/footer/index.tsx | 12 +++++++++++- src/utils/config.ts | 6 +++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/components/footer/index.tsx b/src/components/footer/index.tsx index a6b3b05..eb196fb 100644 --- a/src/components/footer/index.tsx +++ b/src/components/footer/index.tsx @@ -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 { render() { var intl = this.props.intl @@ -69,10 +72,17 @@ class Footer extends React.Component { +
+ {config.icpRecordName && ( + + {config.icpRecordName} + + )} +
) } } -import { injectIntl } from 'react-intl' + export default injectIntl(Footer) diff --git a/src/utils/config.ts b/src/utils/config.ts index 0023084..436b316 100644 --- a/src/utils/config.ts +++ b/src/utils/config.ts @@ -20,6 +20,8 @@ interface Config { apiTimeout: number apiTimeoutMsg: string apiErrorMsg: string + icpRecordName?: string + icpRecordUrl?: string } const api: API = { @@ -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 }