diff --git a/.lintstagedrc.json b/.lintstagedrc.json index 771aac230..38c99b105 100644 --- a/.lintstagedrc.json +++ b/.lintstagedrc.json @@ -1,6 +1,6 @@ { "linters": { - "src/**/*.{js,jsx,scss,json}": ["prettier --write", "git add"], - "src/**/*.{js,jsx}": ["eslint", "flow focus-check --color always", "git add"] + "ui/**/*.{js,jsx,scss,json}": ["prettier --write", "git add"], + "ui/**/*.{js,jsx}": ["eslint", "flow focus-check --color always", "git add"] } } diff --git a/package.json b/package.json index ac86fccb3..33cf82a28 100644 --- a/package.json +++ b/package.json @@ -113,6 +113,7 @@ "eslint-plugin-promise": "^4.0.1", "eslint-plugin-react": "^7.7.0", "eslint-plugin-react-hooks": "^1.6.0", + "eslint-plugin-standard": "^4.0.1", "file-loader": "^4.2.0", "flow-bin": "^0.97.0", "flow-typed": "^2.3.0", diff --git a/ui/component/rewardAuthIntro/index.js b/ui/component/rewardAuthIntro/index.js new file mode 100644 index 000000000..4acfa933c --- /dev/null +++ b/ui/component/rewardAuthIntro/index.js @@ -0,0 +1,12 @@ +import { connect } from 'react-redux'; +import { selectUnclaimedRewardValue } from 'lbryinc'; +import RewardAuthIntro from './view'; + +const select = state => ({ + totalRewardValue: selectUnclaimedRewardValue(state), +}); + +export default connect( + select, + null +)(RewardAuthIntro); diff --git a/ui/component/rewardAuthIntro/view.jsx b/ui/component/rewardAuthIntro/view.jsx new file mode 100644 index 000000000..decc047e6 --- /dev/null +++ b/ui/component/rewardAuthIntro/view.jsx @@ -0,0 +1,35 @@ +// @flow +import React from 'react'; +import CreditAmount from 'component/common/credit-amount'; +import Button from 'component/button'; +import Card from 'component/common/card'; +import I18nMessage from 'component/i18nMessage'; + +type Props = { + balance: number, + totalRewardValue: number, +}; + +function RewardAuthIntro(props: Props) { + const { totalRewardValue } = props; + const totalRewardRounded = Math.floor(totalRewardValue / 10) * 10; + + return ( + , + }} + > + A lbry.tv account allows you to earn more than %credit_amount% in rewards, backup your data, and get content + and security updates. + + } + actions={