Skip to content

Commit 8883376

Browse files
author
Lucas Araujo
committed
[DDW-796] Fix lint issues
1 parent 6d12ff3 commit 8883376

File tree

4 files changed

+18
-199
lines changed

4 files changed

+18
-199
lines changed
Lines changed: 18 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,30 @@
11
// @flow
2-
import React, { Component } from 'react';
2+
import React from 'react';
33
import { observer } from 'mobx-react';
4-
import {
5-
defineMessages,
6-
intlShape,
7-
FormattedMessage,
8-
FormattedHTMLMessage,
9-
} from 'react-intl';
4+
import { FormattedHTMLMessage } from 'react-intl';
105
import BigNumber from 'bignumber.js';
11-
import { Link } from 'react-polymorph/lib/components/Link';
126
import globalMessages from '../../i18n/global-messages';
137
import LoadingSpinner from '../widgets/LoadingSpinner';
14-
import {
15-
CURRENT_VOTING_FUND_NUMBER,
16-
NEXT_VOTING_FUND_NUMBER,
17-
} from '../../config/votingConfig';
188
import styles from './VotingUnavailable.scss';
199

20-
const messages = defineMessages({
21-
heading: {
22-
id: 'voting.unavailable.heading',
23-
defaultMessage: '!!!Project Catalyst voting registration',
24-
description: 'Headline for the "Voting unavailable" screen',
25-
},
26-
paragraph1: {
27-
id: 'voting.unavailable.paragraph1',
28-
defaultMessage:
29-
'!!!Project Catalyst Fund{currentVotingFundNumber} has now ended. Fund{nextVotingFundNumber} is currently in preparation, voting registration is not available yet.',
30-
description: 'First paragraph on the "Voting unavailable" screen',
31-
},
32-
paragraph2: {
33-
id: 'voting.unavailable.paragraph2',
34-
defaultMessage:
35-
'!!!Join our {link1} and {link2} Telegram channels for the latest updates (English language only).',
36-
description: 'Second paragraph on the "Voting unavailable" screen',
37-
},
38-
link1Text: {
39-
id: 'voting.unavailable.link1Text',
40-
defaultMessage: '!!!Catalyst Announcements',
41-
description: 'First link text on the "Voting unavailable" screen',
42-
},
43-
link2Text: {
44-
id: 'voting.unavailable.link2Text',
45-
defaultMessage: '!!!Project Catalyst Chat',
46-
description: 'Second link text on the "Voting unavailable" screen',
47-
},
48-
link1Url: {
49-
id: 'voting.unavailable.link1Url',
50-
defaultMessage: '!!!https://t.me/cardanocatalyst',
51-
description: 'First link URL on the "Voting unavailable" screen',
52-
},
53-
link2Url: {
54-
id: 'voting.unavailable.link2Url',
55-
defaultMessage: '!!!https://t.me/ProjectCatalystChat',
56-
description: 'Second link URL on the "Voting unavailable" screen',
57-
},
58-
});
59-
6010
type Props = {
6111
syncPercentage: number,
62-
isVotingRegistrationAvailable: boolean,
63-
onExternalLinkClick: Function,
6412
};
6513

66-
@observer
67-
export default class VotingUnavailable extends Component<Props> {
68-
static contextTypes = {
69-
intl: intlShape.isRequired,
70-
};
71-
72-
render() {
73-
const { intl } = this.context;
74-
const {
75-
syncPercentage,
76-
isVotingRegistrationAvailable,
77-
onExternalLinkClick,
78-
} = this.props;
79-
80-
return (
81-
<div className={styles.component}>
82-
<LoadingSpinner big />
83-
<div className={styles.description}>
84-
<FormattedHTMLMessage
85-
{...globalMessages.featureUnavailableWhileSyncing}
86-
values={{
87-
syncPercentage: new BigNumber(syncPercentage).toFormat(2),
88-
}}
89-
/>
90-
</div>
14+
const VotingUnavailable = ({ syncPercentage }: Props) => {
15+
return (
16+
<div className={styles.component}>
17+
<LoadingSpinner big />
18+
<div className={styles.description}>
19+
<FormattedHTMLMessage
20+
{...globalMessages.featureUnavailableWhileSyncing}
21+
values={{
22+
syncPercentage: new BigNumber(syncPercentage).toFormat(2),
23+
}}
24+
/>
9125
</div>
92-
);
93-
}
94-
}
26+
</div>
27+
);
28+
};
29+
30+
export default observer(VotingUnavailable);

source/renderer/app/i18n/locales/defaultMessages.json

Lines changed: 0 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -9107,109 +9107,6 @@
91079107
],
91089108
"path": "source/renderer/app/components/voting/VotingNoWallets.json"
91099109
},
9110-
{
9111-
"descriptors": [
9112-
{
9113-
"defaultMessage": "!!!Project Catalyst voting registration",
9114-
"description": "Headline for the \"Voting unavailable\" screen",
9115-
"end": {
9116-
"column": 3,
9117-
"line": 25
9118-
},
9119-
"file": "source/renderer/app/components/voting/VotingUnavailable.js",
9120-
"id": "voting.unavailable.heading",
9121-
"start": {
9122-
"column": 11,
9123-
"line": 21
9124-
}
9125-
},
9126-
{
9127-
"defaultMessage": "!!!Project Catalyst Fund{currentVotingFundNumber} has now ended. Fund{nextVotingFundNumber} is currently in preparation, voting registration is not available yet.",
9128-
"description": "First paragraph on the \"Voting unavailable\" screen",
9129-
"end": {
9130-
"column": 3,
9131-
"line": 31
9132-
},
9133-
"file": "source/renderer/app/components/voting/VotingUnavailable.js",
9134-
"id": "voting.unavailable.paragraph1",
9135-
"start": {
9136-
"column": 14,
9137-
"line": 26
9138-
}
9139-
},
9140-
{
9141-
"defaultMessage": "!!!Join our {link1} and {link2} Telegram channels for the latest updates (English language only).",
9142-
"description": "Second paragraph on the \"Voting unavailable\" screen",
9143-
"end": {
9144-
"column": 3,
9145-
"line": 37
9146-
},
9147-
"file": "source/renderer/app/components/voting/VotingUnavailable.js",
9148-
"id": "voting.unavailable.paragraph2",
9149-
"start": {
9150-
"column": 14,
9151-
"line": 32
9152-
}
9153-
},
9154-
{
9155-
"defaultMessage": "!!!Catalyst Announcements",
9156-
"description": "First link text on the \"Voting unavailable\" screen",
9157-
"end": {
9158-
"column": 3,
9159-
"line": 42
9160-
},
9161-
"file": "source/renderer/app/components/voting/VotingUnavailable.js",
9162-
"id": "voting.unavailable.link1Text",
9163-
"start": {
9164-
"column": 13,
9165-
"line": 38
9166-
}
9167-
},
9168-
{
9169-
"defaultMessage": "!!!Project Catalyst Chat",
9170-
"description": "Second link text on the \"Voting unavailable\" screen",
9171-
"end": {
9172-
"column": 3,
9173-
"line": 47
9174-
},
9175-
"file": "source/renderer/app/components/voting/VotingUnavailable.js",
9176-
"id": "voting.unavailable.link2Text",
9177-
"start": {
9178-
"column": 13,
9179-
"line": 43
9180-
}
9181-
},
9182-
{
9183-
"defaultMessage": "!!!https://t.me/cardanocatalyst",
9184-
"description": "First link URL on the \"Voting unavailable\" screen",
9185-
"end": {
9186-
"column": 3,
9187-
"line": 52
9188-
},
9189-
"file": "source/renderer/app/components/voting/VotingUnavailable.js",
9190-
"id": "voting.unavailable.link1Url",
9191-
"start": {
9192-
"column": 12,
9193-
"line": 48
9194-
}
9195-
},
9196-
{
9197-
"defaultMessage": "!!!https://t.me/ProjectCatalystChat",
9198-
"description": "Second link URL on the \"Voting unavailable\" screen",
9199-
"end": {
9200-
"column": 3,
9201-
"line": 57
9202-
},
9203-
"file": "source/renderer/app/components/voting/VotingUnavailable.js",
9204-
"id": "voting.unavailable.link2Url",
9205-
"start": {
9206-
"column": 12,
9207-
"line": 53
9208-
}
9209-
}
9210-
],
9211-
"path": "source/renderer/app/components/voting/VotingUnavailable.json"
9212-
},
92139110
{
92149111
"descriptors": [
92159112
{

source/renderer/app/i18n/locales/en-US.json

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -658,13 +658,6 @@
658658
"voting.snapshotPhase.votingDateLabel": "Next voting period:",
659659
"voting.tallyingPhase.endDateLabel": "Voting ended:",
660660
"voting.tallyingPhase.resultsLabel": "Check back for results:",
661-
"voting.unavailable.heading": "Project Catalyst voting registration",
662-
"voting.unavailable.link1Text": "Catalyst Announcements",
663-
"voting.unavailable.link1Url": "https://t.me/cardanocatalyst",
664-
"voting.unavailable.link2Text": "Project Catalyst Chat",
665-
"voting.unavailable.link2Url": "https://t.me/ProjectCatalystChat",
666-
"voting.unavailable.paragraph1": "Project Catalyst Fund{currentVotingFundNumber} has now ended. Fund{nextVotingFundNumber} is currently in preparation, voting registration is not available yet.",
667-
"voting.unavailable.paragraph2": "Join our {link1} and {link2} Telegram channels for the latest updates (English language only).",
668661
"voting.votingOpenPhase.dateLabel": "Voting period is open:",
669662
"voting.votingOpenPhase.instruction": "Use mobile app to vote",
670663
"voting.votingRegistration.chooseWallet.step.continueButtonLabel": "Continue",

source/renderer/app/i18n/locales/ja-JP.json

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -658,13 +658,6 @@
658658
"voting.snapshotPhase.votingDateLabel": "!!!Next voting period:",
659659
"voting.tallyingPhase.endDateLabel": "!!!Voting ended:",
660660
"voting.tallyingPhase.resultsLabel": "!!!Check back for results:",
661-
"voting.unavailable.heading": "Project Catalyst有権者登録",
662-
"voting.unavailable.link1Text": "Catalyst案内",
663-
"voting.unavailable.link1Url": "https://t.me/cardanocatalyst",
664-
"voting.unavailable.link2Text": "Project Catalyst Chat",
665-
"voting.unavailable.link2Url": "https://t.me/ProjectCatalystChat",
666-
"voting.unavailable.paragraph1": "Project Catalyst Fund{currentVotingFundNumber}は終了しました。現在Fund{nextVotingFundNumber}は準備中です。有権者登録の開始までしばらくお待ちください。",
667-
"voting.unavailable.paragraph2": "!最新情報は、{link1}やTelegramの{link2}でチェックしてください(英語のみ)。",
668661
"voting.votingOpenPhase.dateLabel": "!!!Voting period is open:",
669662
"voting.votingOpenPhase.instruction": "!!!Use mobile app to vote",
670663
"voting.votingRegistration.chooseWallet.step.continueButtonLabel": "続ける",

0 commit comments

Comments
 (0)