|
|
@ -6,6 +6,7 @@ import debounce from 'lodash.debounce' |
|
|
|
import {markNoticeRead} from '../../../../ui/app/actions' |
|
|
|
import {markNoticeRead} from '../../../../ui/app/actions' |
|
|
|
import Identicon from '../../../../ui/app/components/identicon' |
|
|
|
import Identicon from '../../../../ui/app/components/identicon' |
|
|
|
import Breadcrumbs from './breadcrumbs' |
|
|
|
import Breadcrumbs from './breadcrumbs' |
|
|
|
|
|
|
|
import LoadingScreen from './loading-screen' |
|
|
|
|
|
|
|
|
|
|
|
class NoticeScreen extends Component { |
|
|
|
class NoticeScreen extends Component { |
|
|
|
static propTypes = { |
|
|
|
static propTypes = { |
|
|
@ -55,36 +56,39 @@ class NoticeScreen extends Component { |
|
|
|
const { |
|
|
|
const { |
|
|
|
address, |
|
|
|
address, |
|
|
|
lastUnreadNotice: { title, body }, |
|
|
|
lastUnreadNotice: { title, body }, |
|
|
|
|
|
|
|
isLoading, |
|
|
|
} = this.props |
|
|
|
} = this.props |
|
|
|
const { atBottom } = this.state |
|
|
|
const { atBottom } = this.state |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<div |
|
|
|
isLoading |
|
|
|
className="tou" |
|
|
|
? <LoadingScreen /> |
|
|
|
onScroll={this.onScroll} |
|
|
|
: <div |
|
|
|
> |
|
|
|
className="tou" |
|
|
|
<Identicon address={address} diameter={70} /> |
|
|
|
onScroll={this.onScroll} |
|
|
|
<div className="tou__title">{title}</div> |
|
|
|
|
|
|
|
<Markdown |
|
|
|
|
|
|
|
className="tou__body markdown" |
|
|
|
|
|
|
|
source={body} |
|
|
|
|
|
|
|
skipHtml |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<button |
|
|
|
|
|
|
|
className="first-time-flow__button" |
|
|
|
|
|
|
|
onClick={atBottom && this.acceptTerms} |
|
|
|
|
|
|
|
disabled={!atBottom} |
|
|
|
|
|
|
|
> |
|
|
|
> |
|
|
|
Accept |
|
|
|
<Identicon address={address} diameter={70} /> |
|
|
|
</button> |
|
|
|
<div className="tou__title">{title}</div> |
|
|
|
<Breadcrumbs total={3} currentIndex={2} /> |
|
|
|
<Markdown |
|
|
|
</div> |
|
|
|
className="tou__body markdown" |
|
|
|
|
|
|
|
source={body} |
|
|
|
|
|
|
|
skipHtml |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<button |
|
|
|
|
|
|
|
className="first-time-flow__button" |
|
|
|
|
|
|
|
onClick={atBottom && this.acceptTerms} |
|
|
|
|
|
|
|
disabled={!atBottom} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
Accept |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
<Breadcrumbs total={3} currentIndex={2} /> |
|
|
|
|
|
|
|
</div> |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export default connect( |
|
|
|
export default connect( |
|
|
|
({ metamask: { selectedAddress, lastUnreadNotice } }) => ({ |
|
|
|
({ metamask: { selectedAddress, lastUnreadNotice }, appState: { isLoading } }) => ({ |
|
|
|
lastUnreadNotice, |
|
|
|
lastUnreadNotice, |
|
|
|
address: selectedAddress, |
|
|
|
address: selectedAddress, |
|
|
|
}), |
|
|
|
}), |
|
|
|