/
Staking.js
55 lines (51 loc) · 1.89 KB
/
Staking.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// @flow
import React, { Component } from 'react';
import { observer } from 'mobx-react';
import { defineMessages, intlShape } from 'react-intl';
import BlockGenerationInfo from './BlockGenerationInfo';
import styles from './Staking.scss';
const messages = defineMessages({
heading: {
id: 'paper.delegation.notification.heading',
defaultMessage: '!!!Cardano decentralisation',
description: 'Headline for the Decentralisation notification.',
},
info: {
id: 'paper.delegation.notification.info',
defaultMessage:
'!!!Cardano will soon start its transition from a federated to a decentralized system.This will mark the beginning of the reward era in which stakeholders will be able to participate in the process of staking or can delegate their stake to stake pools to earn rewards in ada.',
description: 'Info for the Decentralisation notification.',
},
timeLeftDesc: {
id: 'paper.delegation.notification.timeLeftDesc',
defaultMessage: '!!!Reward era begins in',
description: 'Description for the Decentralisation notification.',
},
buttonLabel: {
id: 'paper.delegation.notification.buttonLabel',
defaultMessage: '!!!Learn more',
description: 'Button Label for the Decentralisation notification.',
},
});
@observer
export default class Staking extends Component<any> {
static contextTypes = {
intl: intlShape.isRequired,
};
render() {
const { intl } = this.context;
return (
<div className={styles.component}>
<div className={styles.mainContent}>
<BlockGenerationInfo
heading={intl.formatMessage(messages.heading)}
info={intl.formatMessage(messages.info)}
timeLeftDesc={intl.formatMessage(messages.timeLeftDesc)}
timeLeft={(78 * 60 + 10) * 60 * 1000}
buttonLabel={intl.formatMessage(messages.buttonLabel)}
/>
</div>
</div>
);
}
}