-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #539 from Concordium/ui-update/setup-delegation-intro
UI update/setup delegation intro
- Loading branch information
Showing
18 changed files
with
183 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
packages/browser-wallet/src/popup/popupX/pages/EarningRewards/Baker/Intro/BakerIntro.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
107 changes: 64 additions & 43 deletions
107
...s/browser-wallet/src/popup/popupX/pages/EarningRewards/Delegator/Intro/DelegatorIntro.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,78 @@ | ||
import React from 'react'; | ||
import Carousel from '@popup/popupX/shared/Carousel'; | ||
import { useNavigate } from 'react-router-dom'; | ||
import { absoluteRoutes } from '@popup/popupX/constants/routes'; | ||
import Page from '@popup/popupX/shared/Page'; | ||
import { Trans, useTranslation } from 'react-i18next'; | ||
import ExternalLink from '@popup/popupX/shared/ExternalLink'; | ||
|
||
export default function DelegatorIntro() { | ||
const nav = useNavigate(); | ||
const { t } = useTranslation('x', { keyPrefix: 'earn.delegator.intro' }); | ||
return ( | ||
<div className="delegator-intro-container"> | ||
<div className="delegator-intro__title"> | ||
<span className="heading_medium">Delegation</span> | ||
</div> | ||
<Carousel> | ||
<Page className="delegator-intro-container"> | ||
<Carousel onDone={() => nav(absoluteRoutes.settings.earn.delegator.type.path)}> | ||
<span className="capture__main_small"> | ||
<div> | ||
Delegation allows users on the Concordium blockchain to earn rewards without the need to become | ||
a validator or run a node. | ||
</div> | ||
<div>By delegating some of your funds to a pool, you can earn rewards.</div> | ||
<div> | ||
On the next few pages, we will go through the basics of delegation. If you want to learn more, | ||
you can visit our | ||
<a | ||
className="capture__main_small" | ||
href="https://developer.concordium.software/en/mainnet/net/concepts/concepts-delegation.html" | ||
> | ||
documentation website | ||
</a> | ||
</div> | ||
<Page.Top heading={t('1.title')} /> | ||
<Trans | ||
t={t} | ||
i18nKey="1.body" | ||
components={{ | ||
'1': ( | ||
<ExternalLink path="https://developer.concordium.software/en/mainnet/net/concepts/concepts-delegation.html" /> | ||
), | ||
}} | ||
/> | ||
</span> | ||
<span className="capture__main_small"> | ||
<div> | ||
To become a delegator you must run a node on the Concordium blockchain. Make sure that you have | ||
a setup where the node can operate around the clock. | ||
</div> | ||
<div> | ||
You can run the node yourself or use a third-party provider. Make sure your account in the | ||
wallet has the required amount of CCD to become a delegator. | ||
</div> | ||
<Page.Top heading={t('2.title')} /> | ||
<Trans | ||
t={t} | ||
i18nKey="2.body" | ||
components={{ | ||
ul: <ul />, | ||
li: <li />, | ||
'1': ( | ||
<ExternalLink path="https://developer.concordium.software/en/mainnet/net/concepts/concepts-delegation.html" /> | ||
), | ||
}} | ||
/> | ||
</span> | ||
<span className="capture__main_small"> | ||
<div> | ||
You have the option when adding a delegator to open a staking pool or not. A staking pool allows | ||
others who want to earn rewards to do so without the need to run a node or become a delegator | ||
themselves. | ||
</div> | ||
<div> | ||
To do this they delegate an amount to your staking pool which then increases your total stake | ||
and your chances of winning the lottery to bake a block. At each pay day the rewards will be | ||
distributed to you and your delegators. | ||
</div> | ||
<div> | ||
You can also choose not to open a pool, in which case only your own stake applies toward the | ||
lottery. You can always open or close a pool later. | ||
</div> | ||
<Page.Top heading={t('3.title')} /> | ||
<Trans | ||
t={t} | ||
i18nKey="3.body" | ||
components={{ | ||
ul: <ul />, | ||
li: <li />, | ||
'1': ( | ||
<ExternalLink path="https://developer.concordium.software/en/mainnet/net/concepts/concepts-delegation.html" /> | ||
), | ||
}} | ||
/> | ||
</span> | ||
<span className="capture__main_small"> | ||
<Page.Top heading={t('4.title')} /> | ||
<Trans t={t} i18nKey="4.body" /> | ||
</span> | ||
<span className="capture__main_small"> | ||
<Page.Top heading={t('5.title')} /> | ||
<Trans | ||
t={t} | ||
i18nKey="5.body" | ||
components={{ | ||
'1': ( | ||
<ExternalLink path="https://developer.concordium.software/en/mainnet/net/concepts/concepts-delegation.html" /> | ||
), | ||
}} | ||
/> | ||
</span> | ||
<span className="capture__main_small"> | ||
<Page.Top heading={t('6.title')} /> | ||
<Trans t={t} i18nKey="6.body" /> | ||
</span> | ||
</Carousel> | ||
</div> | ||
</Page> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 34 additions & 6 deletions
40
packages/browser-wallet/src/popup/popupX/pages/EarningRewards/i18n/en.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
packages/browser-wallet/src/popup/popupX/pages/SeedPhrase/SeedPhrase.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,8 @@ | |
} | ||
} | ||
|
||
&__icon { | ||
&__icon, | ||
&__text { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
|
Oops, something went wrong.