diff --git a/examples/rewards-mobile-settings/.gitignore b/examples/rewards-mobile-settings/.gitignore
deleted file mode 100644
index 53c37a166..000000000
--- a/examples/rewards-mobile-settings/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-dist
\ No newline at end of file
diff --git a/examples/rewards-mobile-settings/app.tsx b/examples/rewards-mobile-settings/app.tsx
deleted file mode 100644
index 4d4e9c4c6..000000000
--- a/examples/rewards-mobile-settings/app.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-import * as React from 'react'
-import { render } from 'react-dom'
-
-import SettingsMobile from '../../stories/features/rewards/settingsMobile/settingsMobile'
-import { ThemeProvider } from '../../src/theme'
-import Theme from '../../src/theme/brave-default'
-
-window.addEventListener('DOMContentLoaded', function () {
- const appElement = document.createElement('div')
- document.body.appendChild(appElement)
- render(
-
-
- ,
- appElement
- )
-})
-
diff --git a/examples/rewards-mobile-settings/package.json b/examples/rewards-mobile-settings/package.json
deleted file mode 100644
index 8023826b9..000000000
--- a/examples/rewards-mobile-settings/package.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "name": "standalone-rewards-mobile-settings",
- "version": "1.0.0",
- "description": "",
- "main": "index.js",
- "scripts": {
- "build": "webpack --config webpack.config.js",
- "start": "webpack-dev-server --open"
- },
- "author": "",
- "devDependencies": {
- "html-webpack-harddisk-plugin": "^1.0.1",
- "html-webpack-plugin": "^3.2.0",
- "react": "^16.6.0",
- "react-dom": "^16.6.0",
- "ts-loader": "^5.3.0",
- "typescript": "^3.1.6",
- "webpack": "^4.24.0",
- "webpack-cli": "^3.1.2",
- "webpack-dev-server": "^3.1.14"
- }
-}
diff --git a/examples/rewards-mobile-settings/tsconfig.json b/examples/rewards-mobile-settings/tsconfig.json
deleted file mode 100644
index ff13c3276..000000000
--- a/examples/rewards-mobile-settings/tsconfig.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "extends": "../../tsconfig",
- "include": [
- "../../definitions",
- ]
-}
diff --git a/examples/rewards-mobile-settings/webpack.config.js b/examples/rewards-mobile-settings/webpack.config.js
deleted file mode 100644
index 0c073d216..000000000
--- a/examples/rewards-mobile-settings/webpack.config.js
+++ /dev/null
@@ -1,44 +0,0 @@
-const path = require('path')
-const HtmlWebpackPlugin = require('html-webpack-plugin')
-const HtmlWebpackHarddiskPlugin = require('html-webpack-harddisk-plugin')
-
-module.exports = {
- mode: "development",
- entry: "./app.tsx",
- output: {
- filename: "bundle.js",
- path: path.resolve(__dirname, 'dist')
- },
- devServer: {
- contentBase: './dist',
- after: function (app, server) {
- // Use JS for routing by serving same html
- // file for all requests
- app.get('*', (req, res) => {
- res.sendFile(path.resolve(__dirname, 'dist', 'index.html'))
- })
- }
- },
- resolve: {
- // Add `.ts` and `.tsx` as a resolvable extension.
- extensions: [".ts", ".tsx", ".js"]
- },
- plugins: [
- new HtmlWebpackPlugin({alwaysWriteToDisk: true|false}),
- new HtmlWebpackHarddiskPlugin()
- ],
- module: {
- rules: [
- // all files with a `.ts` or `.tsx` extension will be handled by `ts-loader`
- { test: /\.tsx?$/, loader: "ts-loader" },
- {
- test: /\.(woff|woff2|ttf|eot|svg|png|jpg|jpeg)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
- loader: 'url-loader'
- },
- {
- test: /\.css$/,
- loader: 'style-loader!css-loader?-minimize'
- }
- ]
- }
-}
\ No newline at end of file
diff --git a/src/features/rewards/adRowsDetails/__snapshots__/spec.tsx.snap b/src/features/rewards/adRowsDetails/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 6b708d8f4..000000000
--- a/src/features/rewards/adRowsDetails/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,94 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Ad Rows Details tests basic tests matches the snapshot 1`] = `
-.c4 {
- font-family: Muli,sans-serif;
- font-size: 14px;
- color: #5e6175;
- display: inline-block;
-}
-
-.c1 {
- cursor: pointer;
- white-space: nowrap;
-}
-
-.c0 {
- text-align: left;
- padding-top: 15px;
-}
-
-.c5 {
- width: 94.5%;
- padding-left: 10px;
- display: inline-block;
-}
-
-.c6 {
- color: #c2c4cf;
- background-color: #c2c4cf;
- height: 2px;
- border: none;
-}
-
-.c2 {
- margin: 0;
- background: none;
- border: none;
- width: 16px;
- height: 16px;
- color: #c2c4cf;
- padding: 1px;
- outline: none;
- display: inline-block;
- text-align: center;
-}
-
-.c3 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-
-
-
- |
-
-`;
diff --git a/src/features/rewards/adRowsDetails/index.tsx b/src/features/rewards/adRowsDetails/index.tsx
deleted file mode 100644
index 033fa1199..000000000
--- a/src/features/rewards/adRowsDetails/index.tsx
+++ /dev/null
@@ -1,100 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledAdPortionTD,
- StyledAdsDateRow,
- StyledAdsDetailRow,
- StyledCaratIcon,
- StyledDateText,
- StyledHR,
- StyledHRDiv,
- StyledInnerStartTD,
- StyledSpaceDiv
- } from './style'
-import {
- CaratTriangleDownSIcon, CaratTriangleRightSIcon
-} from '../../../components/icons'
-import { DetailRow } from '../tableAdsHistory'
-import { Row, Cell } from '../../../components/dataTables/table'
-
-export interface Props {
- id?: string
- row?: DetailRow
- rowIndex?: number
- detailRows?: Row[]
-}
-
-interface State {
- innerDetailVisible: boolean
-}
-
-export default class AdRowsDetails extends React.PureComponent {
- constructor (props: Props) {
- super(props)
- this.state = {
- innerDetailVisible: true
- }
- }
-
- setInnerVisible = () => {
- this.setState({
- innerDetailVisible: !this.state.innerDetailVisible
- })
- }
-
- render () {
- const { row, rowIndex, detailRows } = this.props
- return (
- <>
-
-
-
-
-
- {
- this.state.innerDetailVisible
- ?
- :
- }
-
-
- {
- row ? row.date : ''
- }
-
-
-
-
-
-
- |
-
- {
- detailRows && this.state.innerDetailVisible ?
- detailRows.map((detailRow: Row, j: number) => {
- return (
-
- {
- detailRow.content.map((detailCell: Cell, k: number) => {
- return k === 0 ?
-
-
-
- :
-
- {detailCell.content}
-
- })
- }
-
- )
- })
- : null
- }
- >
- )
- }
-}
diff --git a/src/features/rewards/adRowsDetails/spec.tsx b/src/features/rewards/adRowsDetails/spec.tsx
deleted file mode 100644
index 60d17cb7d..000000000
--- a/src/features/rewards/adRowsDetails/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import { TestThemeProvider } from '../../../theme'
-import AdRowsDetails from './index';
-
-describe('Ad Rows Details tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#adRowsDetails').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/adRowsDetails/style.ts b/src/features/rewards/adRowsDetails/style.ts
deleted file mode 100644
index f49c932ee..000000000
--- a/src/features/rewards/adRowsDetails/style.ts
+++ /dev/null
@@ -1,72 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-
-export const StyledDateText = styled<{}, 'div'>('div')`
- font-family: ${p => p.theme.fontFamily.body};
- font-size: 14px;
- color: ${p => p.theme.color.text};
- display: inline-block;
-`
-export const StyledAdsDateRow = styled<{}, 'div'>('div')`
- cursor: pointer;
- white-space: nowrap;
-`
-
-export const StyledAdsDetailRow = styled<{}, 'div'>('div')`
- text-align: left;
- padding-top: 15px;
-`
-
-export const StyledHRDiv = styled<{}, 'div'>('div')`
- width: 94.5%;
- padding-left: 10px;
- display: inline-block;
-`
-
-export const StyledHR = styled<{}, 'hr'>('hr')`
- color: ${p => p.theme.color.subtle};
- background-color: ${p => p.theme.color.subtle};
- height: 2px;
- border: none;
-`
-
-export const StyledCaratIcon = styled<{}, 'div'>('div')`
- margin: 0;
- background: none;
- border: none;
- width: 16px;
- height: 16px;
- color: ${p => p.theme.color.subtle};
- padding: 1px;
- outline: none;
- display: inline-block;
- text-align: center;
-`
-
-export const StyledAdPortionTD = styled<{}, 'td'>('td')`
- font-family: ${p => p.theme.fontFamily.body};
- font-size: 14px;
- font-weight: 500;
- color: ${p => p.theme.color.text};
- border-bottom: none;
- padding: 5px 0;
- text-align: left;
-`
-
-export const StyledInnerStartTD = styled<{}, 'td'>('td')`
- font-family: ${p => p.theme.fontFamily.body};
- font-size: 14px;
- font-weight: 500;
- color: ${p => p.theme.color.text};
- border-bottom: none;
- padding: 12px 0;
- text-align: left;
- height: 0%;
-`
-
-export const StyledSpaceDiv = styled<{}, 'div'>('div')`
- min-width: 55px;
-`
diff --git a/src/features/rewards/alert/__snapshots__/spec.tsx.snap b/src/features/rewards/alert/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 15e22555a..000000000
--- a/src/features/rewards/alert/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,106 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Alert tests basic tests matches the snapshot 1`] = `
-.c0 {
- height: 100%;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-box-pack: start;
- -webkit-justify-content: flex-start;
- -ms-flex-pack: start;
- justify-content: flex-start;
- -webkit-align-content: flex-start;
- -ms-flex-line-pack: start;
- align-content: flex-start;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- -webkit-flex-wrap: nowrap;
- -ms-flex-wrap: nowrap;
- flex-wrap: nowrap;
- padding: 15px 38px 15px 19px;
- font-family: Muli,sans-serif;
- width: 100%;
- --alert-wrapper-color: #fff;
- background: var(--alert-wrapper-color);
-}
-
-.c1 {
- width: 40px;
- height: 40px;
- -webkit-flex-basis: 40px;
- -ms-flex-preferred-size: 40px;
- flex-basis: 40px;
-}
-
-.c4 {
- -webkit-box-flex: 1;
- -webkit-flex-grow: 1;
- -ms-flex-positive: 1;
- flex-grow: 1;
- -webkit-flex-basis: 50%;
- -ms-flex-preferred-size: 50%;
- flex-basis: 50%;
- padding-left: 19px;
- font-family: Muli,sans-serif;
- font-size: 16px;
- font-weight: 300;
- -webkit-letter-spacing: -0.3px;
- -moz-letter-spacing: -0.3px;
- -ms-letter-spacing: -0.3px;
- letter-spacing: -0.3px;
- --alert-content-color: #838391;
- --alert-content-bold: #4b4c5c;
- color: var(--alert-content-color);
-}
-
-.c4 b {
- font-weight: 600;
- color: var(--alert-content-bold);
-}
-
-.c2 {
- color: #1BBA6A;
-}
-
-.c3 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-
-`;
diff --git a/src/features/rewards/alert/index.tsx b/src/features/rewards/alert/index.tsx
deleted file mode 100644
index d5d531e00..000000000
--- a/src/features/rewards/alert/index.tsx
+++ /dev/null
@@ -1,75 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledWrapper,
- StyledContent,
- StyledClose,
- StyledIcon,
- StyledError,
- StyledSuccess,
- StyledWarning
-} from './style'
-import {
- AlertCircleIcon,
- CheckCircleIcon,
- CloseStrokeIcon
-} from '../../../components/icons'
-
-export type Type = 'error' | 'success' | 'warning'
-
-export interface Props {
- type: Type
- id?: string
- children?: React.ReactNode
- onClose?: () => void
- colored?: boolean
- bg?: boolean
-}
-
-export default class Alert extends React.PureComponent {
- get icon () {
- switch (this.props.type) {
- case 'error':
- return (
-
-
-
- )
- case 'success':
- return (
-
-
-
- )
- case 'warning':
- return (
-
-
-
- )
- }
-
- return null
- }
-
- render () {
- const { id, children, onClose, colored, bg, type } = this.props
-
- return (
-
- {this.icon}
-
- {children}
-
- {onClose ? (
-
-
-
- ) : null}
-
- )
- }
-}
diff --git a/src/features/rewards/alert/spec.tsx b/src/features/rewards/alert/spec.tsx
deleted file mode 100644
index a39005db7..000000000
--- a/src/features/rewards/alert/spec.tsx
+++ /dev/null
@@ -1,27 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import Alert, { Props } from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('Alert tests', () => {
- const baseComponent = (props: Props) =>
-
-
-
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent({ type: 'success' })
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent({ type: 'success' }))
- const assertion = wrapper.find('#alert').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/alert/style.ts b/src/features/rewards/alert/style.ts
deleted file mode 100644
index 173b80469..000000000
--- a/src/features/rewards/alert/style.ts
+++ /dev/null
@@ -1,110 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled, { css } from '../../../theme'
-import { Props } from './index'
-
-const getBgColor = (p: Props) => {
- let color = '#fff'
-
- if (p.bg) {
- switch (p.type) {
- case 'error':
- color = '#FFEEF1'
- break
- case 'success':
- color = '#E7F6FF'
- break
- case 'warning':
- color = '#FAF2DE'
- break
- }
- }
-
- return css`
- --alert-wrapper-color: ${color};
- `
-}
-
-const getColor = (p: Props) => {
- let color = '#838391'
- let bold = '#4b4c5c'
-
- if (p.colored) {
- switch (p.type) {
- case 'error':
- color = bold = '#F36980'
- break
- case 'success':
- color = bold = '#67D79D'
- break
- case 'warning':
- color = bold = '#FF7900'
- break
- }
- }
-
- return css`
- --alert-content-color: ${color};
- --alert-content-bold: ${bold};
- `
-}
-
-export const StyledWrapper = styled('div')`
- height: 100%;
- display: flex;
- justify-content: flex-start;
- align-content: flex-start;
- align-items: center;
- flex-wrap: nowrap;
- padding: 15px 38px 15px 19px;
- font-family: ${p => p.theme.fontFamily.body};
- width: 100%;
- ${getBgColor};
- background: var(--alert-wrapper-color);
-`
-
-export const StyledIcon = styled<{}, 'span'>('span')`
- width: 40px;
- height: 40px;
- flex-basis: 40px;
-`
-
-export const StyledContent = styled('div')`
- flex-grow: 1;
- flex-basis: 50%;
- padding-left: 19px;
- font-family: ${p => p.theme.fontFamily.body};
- font-size: 16px;
- font-weight: 300;
- letter-spacing: -0.3px;
- ${getColor};
- color: var(--alert-content-color);
-
- b {
- font-weight: 600;
- color: var(--alert-content-bold);
- }
-`
-
-export const StyledClose = styled<{}, 'div'>('div')`
- width: 11px;
- height: 11px;
- position: absolute;
- top: 14px;
- right: 14px;
- z-index: 2;
-`
-
-export const StyledError = styled<{}, 'div'>('div')`
- color: #F43405;
-`
-
-export const StyledSuccess = styled<{}, 'div'>('div')`
- color: #1BBA6A;
-`
-
-export const StyledWarning = styled<{}, 'div'>('div')`
- color: #FF7900;
-`
diff --git a/src/features/rewards/amount/__snapshots__/spec.tsx.snap b/src/features/rewards/amount/__snapshots__/spec.tsx.snap
deleted file mode 100644
index e5bde389e..000000000
--- a/src/features/rewards/amount/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,144 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Amount tests basic tests matches the snapshot 1`] = `
-.c0 {
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- font-family: Muli,sans-serif;
- border: none;
- background: none;
- padding: 0;
- cursor: pointer;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- margin: 0 0 8px 0;
-}
-
-.c1 {
- opacity: 1;
- border-radius: 20px;
- color: #fff;
- border: 1px solid rgba(255,255,255,0.35);
- background: transparent;
- vertical-align: baseline;
- padding: 0 12px;
- min-height: 32px;
- min-width: 82px;
- margin-right: 12px;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- -webkit-box-pack: center;
- -webkit-justify-content: center;
- -ms-flex-pack: center;
- justify-content: center;
- margin-bottom: 0px;
-}
-
-.c5 {
- margin-left: 5px;
-}
-
-.c4 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
-}
-
-.c2 {
- margin-right: 6px;
- width: 23px;
-}
-
-.c6 {
- vertical-align: baseline;
- opacity: 0.4;
- font-size: 10px;
- color: #ffffff;
- display: inline-block;
- font-weight: 500;
-}
-
-.c3 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-
-`;
diff --git a/src/features/rewards/amount/index.tsx b/src/features/rewards/amount/index.tsx
deleted file mode 100644
index 743fd2caa..000000000
--- a/src/features/rewards/amount/index.tsx
+++ /dev/null
@@ -1,46 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import { StyledWrapper, StyledAmount, StyledNumber, StyledLogo, StyledConverted, StyledTokens } from './style'
-import { getLocale } from '../../../helpers'
-import { BatColorIcon } from '../../../components/icons'
-
-export interface Props {
- amount: string
- converted: string
- onSelect: (amount: string) => void
- id?: string
- selected?: boolean
- type?: 'big' | 'small'
- currency?: string
- isMobile?: boolean
-}
-
-export default class Amount extends React.PureComponent {
- static defaultProps = {
- type: 'small',
- currency: 'USD',
- converted: 0
- }
-
- getAboutText = (isMobile?: boolean) => {
- return isMobile ? '' : getLocale('about')
- }
-
- render () {
- const { id, onSelect, amount, selected, type, converted, currency, isMobile } = this.props
-
- return (
-
-
- {amount} {type === 'big' ? 'BAT' : null}
-
-
- {this.getAboutText(isMobile)} {converted} {currency}
-
-
- )
- }
-}
diff --git a/src/features/rewards/amount/spec.tsx b/src/features/rewards/amount/spec.tsx
deleted file mode 100644
index 8a51f2ece..000000000
--- a/src/features/rewards/amount/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import Amount from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('Amount tests', () => {
- const baseComponent = (props?: object) => {}} {...props} />
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#amount').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/amount/style.ts b/src/features/rewards/amount/style.ts
deleted file mode 100644
index 9f89cdf46..000000000
--- a/src/features/rewards/amount/style.ts
+++ /dev/null
@@ -1,57 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from '../../../theme'
-import { Props } from './index'
-
-export const StyledWrapper = styled, 'button'>('button')`
- user-select: none;
- font-family: ${p => p.theme.fontFamily.body};
- border: none;
- background: none;
- padding: 0;
- cursor: pointer;
- display: ${p => p.isMobile ? 'block' : 'flex'};
- align-items: center;
- margin: ${p => p.isMobile ? '0 auto 8px auto' : '0 0 8px 0'};
-`
-
-export const StyledAmount = styled, 'div'>('div')`
- opacity: 1;
- border-radius: 20px;
- color: #fff;
- border: 1px solid rgba(255, 255, 255, 0.35);
- background: ${p => p.selected ? 'rgba(255, 255, 255, 0.35)' : 'transparent'};
- vertical-align: baseline;
- padding: ${p => p.type === 'big' ? '0 16px' : '0 12px'};
- min-height: ${p => p.type === 'big' ? 40 : 32}px;
- min-width: ${p => p.isMobile ? '100px' : p.type === 'big' ? '118px' : '82px'};
- margin-right: ${p => p.isMobile ? 0 : 12}px;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-bottom: ${p => p.isMobile ? 5 : 0}px;
-`
-
-export const StyledTokens = styled<{}, 'div'>('div')`
- margin-left: 5px;
-`
-
-export const StyledNumber = styled.span`
- display: flex;
-`
-
-export const StyledLogo = styled, 'div'>('div')`
- margin-right: 6px;
- width: ${p => p.isMobile ? 20 : 23}px;
-`
-
-export const StyledConverted = styled, 'div'>('div')`
- vertical-align: baseline;
- opacity: ${p => p.selected ? 1 : 0.4};
- font-size: ${p => p.type === 'big' ? '12px' : '10px'};
- color: #ffffff;
- display: ${p => p.isMobile ? 'block' : 'inline-block'};
- font-weight: 500;
-`
diff --git a/src/features/rewards/box/__snapshots__/spec.tsx.snap b/src/features/rewards/box/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 702acc76f..000000000
--- a/src/features/rewards/box/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,232 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Box tests basic tests matches the snapshot 1`] = `
-.c2 {
- max-width: 100%;
- width: 100%;
- min-height: auto;
- margin: 0;
- background-color: #fff;
- border-radius: 4px;
- box-shadow: 0 2px 4px rgba(0,0,0,.2);
- font-size: inherit;
- font-family: Muli,sans-serif;
- box-sizing: border-box;
- position: relative;
-}
-
-.c3 {
- padding: 32px;
-}
-
-.c0 {
- width: 100%;
- margin: 0 0 24px;
-}
-
-.c1 {
- font-size: 14px;
-}
-
-.c4 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- -webkit-box-pack: center;
- -webkit-justify-content: center;
- -ms-flex-pack: center;
- justify-content: center;
-}
-
-.c5 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-flex-direction: column;
- -ms-flex-direction: column;
- flex-direction: column;
-}
-
-.c7 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- font-family: Poppins,sans-serif;
- font-size: 20px;
- font-weight: 600;
- color: #4b4c5c;
-}
-
-.c9 {
- width: 100%;
- font-size: 15px;
- color: #5e6175;
- padding: 12px 0 0;
- line-height: 1.7;
-}
-
-.c10 {
- -webkit-flex-basis: 100%;
- -ms-flex-preferred-size: 100%;
- flex-basis: 100%;
- -webkit-box-flex: 1;
- -webkit-flex-grow: 1;
- -ms-flex-positive: 1;
- flex-grow: 1;
- margin-top: 25px;
-}
-
-.c11 {
- background: #fff;
- display: none;
- width: 100%;
-}
-
-.c12 {
- display: none;
- position: absolute;
- right: 24px;
- top: 24px;
- width: 24px;
- height: 24px;
- border: none;
- background: none;
- padding: 0;
- cursor: pointer;
- color: #84889c;
-}
-
-.c6 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- -webkit-box-pack: justify;
- -webkit-justify-content: space-between;
- -ms-flex-pack: justify;
- justify-content: space-between;
- height: 100%;
-}
-
-.c14 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- margin: 0 0 24px;
-}
-
-.c8 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
-}
-
-.c15 {
- font-size: 20px;
- font-weight: 600;
- font-family: Poppins,sans-serif;
- color: #5e6175;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
-}
-
-.c13 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-
-
-
-
-
-
-
-
-
- test MISSING: settings
-
-
-
-
-
-
-
-`;
diff --git a/src/features/rewards/box/index.tsx b/src/features/rewards/box/index.tsx
deleted file mode 100644
index 08a73d5a6..000000000
--- a/src/features/rewards/box/index.tsx
+++ /dev/null
@@ -1,130 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledWrapper,
- StyledCard,
- StyledDescription,
- StyledSettingsIcon,
- StyledContent,
- StyledTitle,
- StyledSettingsWrapper,
- StyledSettingsClose,
- StyledSettingsTitle,
- StyledSettingsText,
- StyledSettingTitleWrapper,
- StyledContentWrapper,
- StyledFlip,
- StyledSettingsToggleContainer
-} from './style'
-import { Tooltip } from '../'
-import Toggle from '../../../components/formControls/toggle/index'
-import { getLocale } from '../../../helpers'
-import { CloseCircleOIcon, SettingsIcon } from '../../../components/icons'
-
-export type Type = 'ads' | 'contribute' | 'donation'
-
-export interface Props {
- title: string
- id?: string
- description?: string
- toggle?: boolean
- checked?: boolean
- attachedAlert?: React.ReactNode
- onToggle?: () => void
- settingsChild?: React.ReactNode
- disabledContent?: React.ReactNode
- children?: React.ReactNode
- testId?: string
- type: Type
- onSettingsClick?: () => void
- settingsOpened?: boolean
-}
-
-/*
- TODO
- - add fade effect
- */
-export default class Box extends React.PureComponent {
- getSettingsTitle = (title: string) => {
- return `${title} ${getLocale('settings')}`
- }
-
- render () {
- const {
- id,
- title,
- toggle,
- checked,
- attachedAlert,
- onToggle,
- settingsChild,
- disabledContent,
- description,
- type,
- children,
- testId,
- settingsOpened,
- onSettingsClick
- } = this.props
-
- return (
-
-
-
-
-
-
- {title}
-
-
- {
- settingsChild && ((toggle && checked) || !toggle) ?
-
-
-
-
-
- : null
- }
- {
- toggle ?
-
- : null
- }
-
-
-
- {description}
-
-
- {
- disabledContent
- ? disabledContent
- : children
- }
-
-
-
-
-
-
-
- {this.getSettingsTitle(title)}
-
- {settingsChild}
-
-
-
- {attachedAlert}
-
- )
- }
-}
diff --git a/src/features/rewards/box/spec.tsx b/src/features/rewards/box/spec.tsx
deleted file mode 100644
index f7c6f3aad..000000000
--- a/src/features/rewards/box/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import Box from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('Box tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#box').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/box/style.tsx b/src/features/rewards/box/style.tsx
deleted file mode 100644
index 6849fa849..000000000
--- a/src/features/rewards/box/style.tsx
+++ /dev/null
@@ -1,121 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import styled from '../../../theme'
-import { Type } from './index'
-import Card, { CardProps } from '../../../components/layout/card'
-
-interface StyleProps {
- open?: boolean
- float?: string
- checked?: boolean
- type?: Type
-}
-
-const colors: Record = {
- ads: '#C12D7C',
- contribute: '#9F22A1',
- donation: '#696FDC'
-}
-
-export const StyledWrapper = styled('div')`
- width: 100%;
- margin: 0 0 24px;
-`
-
-const CustomCard: React.FC = (props) =>
-
-
-export const StyledCard = styled(CustomCard)`
- font-size: 14px;
-`
-
-export const StyledFlip = styled('div')`
- display: flex;
- align-items: center;
- justify-content: center;
-`
-
-export const StyledContentWrapper = styled('div')`
- display: ${p => p.open ? 'flex' : 'none'};
- flex-direction: column;
-`
-
-export const StyledTitle = styled('div')`
- display: flex;
- font-family: ${p => p.theme.fontFamily.heading};
- font-size: 20px;
- font-weight: 600;
- color: ${p => p.type && colors[p.type] || '#4b4c5c'};
-`
-
-export const StyledDescription = styled<{}, 'div'>('div')`
- width: 100%;
- font-size: 15px;
- color: ${p => p.theme.color.text};
- padding: 12px 0 0;
- line-height: 1.7;
-`
-
-export const StyledSettingsIcon = styled('button')`
- width: 24px;
- height: 24px;
- border: none;
- background: none;
- padding: 0;
- cursor: pointer;
- color: #A1A8F2;
-`
-
-export const StyledContent = styled<{}, 'div'>('div')`
- flex-basis: 100%;
- flex-grow: 1;
- margin-top: 25px;
-`
-
-export const StyledSettingsWrapper = styled('div')`
- background: #fff;
- display: ${p => p.open ? 'block' : 'none'};
- width: 100%;
-`
-
-export const StyledSettingsClose = styled('button')`
- display: ${p => p.open ? 'block' : 'none'};
- position: absolute;
- right: 24px;
- top: 24px;
- width: 24px;
- height: 24px;
- border: none;
- background: none;
- padding: 0;
- cursor: pointer;
- color: ${p => p.theme.palette.grey600};
-`
-export const StyledSettingTitleWrapper = styled('div')`
- display: flex;
- align-items: center;
- justify-content: space-between;
- height: 100%;
-`
-
-export const StyledSettingsTitle = styled<{}, 'div'>('div')`
- display: flex;
- margin: 0 0 24px;
-`
-
-export const StyledSettingsToggleContainer = styled<{}, 'div'>('div')`
- display: flex;
- align-items: center;
-`
-
-export const StyledSettingsText = styled<{}, 'div'>('div')`
- font-size: 20px;
- font-weight: 600;
- font-family: ${p => p.theme.fontFamily.heading};
- color: ${p => p.theme.color.text};
- display: flex;
- align-items: center;
-`
diff --git a/src/features/rewards/boxAlert/__snapshots__/spec.tsx.snap b/src/features/rewards/boxAlert/__snapshots__/spec.tsx.snap
deleted file mode 100644
index acb2a5eac..000000000
--- a/src/features/rewards/boxAlert/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,89 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`BoxAlert tests basic tests matches the snapshot 1`] = `
-.c0 {
- width: 100%;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- -webkit-box-pack: center;
- -webkit-justify-content: center;
- -ms-flex-pack: center;
- justify-content: center;
- background: #f0f8ff;
- padding: 16px;
- box-shadow: 0 2px 4px rgba(0,0,0,0.2);
- border-radius: 4px;
-}
-
-.c1 {
- width: 24px;
- height: 24px;
- margin: 8px;
- color: #339af0;
-}
-
-.c3 {
- font-size: 16px;
- font-family: Muli,sans-serif;
- color: #5e6175;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
-}
-
-.c4 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
-}
-
-.c2 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-
-
-
-
- MISSING: adsNotSupported
-
-
-
-`;
diff --git a/src/features/rewards/boxAlert/index.tsx b/src/features/rewards/boxAlert/index.tsx
deleted file mode 100644
index d410f9694..000000000
--- a/src/features/rewards/boxAlert/index.tsx
+++ /dev/null
@@ -1,154 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this file,
-* You can obtain one at http://mozilla.org/MPL/2.0/.
-*/
-
-// Utils
-import * as React from 'react'
-import { getLocale } from '../../../helpers'
-
-// Components
-import {
- StyledWrapper,
- StyledAlertIcon,
- StyledInfo,
- StyledMessage,
- StyledMonthlyTips,
- StyledReviewWrapper,
- StyledReviewList,
- StyledModalContent,
- StyledModalInfo,
- StyledListMessage,
- StyledList,
- StyledListItem,
- StyledTipsIcon,
- StyledButton,
- StyledButtonContainer
-} from './style'
-import { Modal } from '../../../components'
-import { AlertCircleIcon, RewardsSendTipsIcon } from '../../../components/icons'
-import Button from '../../../components/buttonsIndicators/button'
-
-export type Type = 'tips' | 'ads'
-
-export interface Props {
- type: Type
- testId?: string
- onReview?: () => void
-}
-
-interface State {
- modalShown: boolean
-}
-
-export default class BoxAlert extends React.PureComponent {
- constructor (props: Props) {
- super(props)
- this.state = {
- modalShown: false
- }
- }
-
- toggleModalDisplay = () => {
- this.setState({
- modalShown: !this.state.modalShown
- })
-
- if (this.state.modalShown && this.props.onReview) {
- this.props.onReview()
- }
- }
-
- pinnedSitesModal = () => {
- return (
-
-
-
-
-
-
-
- {getLocale('pinnedSitesHeader')}
-
-
- {getLocale('monthlyTips')}
-
-
- {getLocale('pinnedSitesMsg')}
-
-
-
- {getLocale('pinnedSitesOne')}
-
-
- {getLocale('pinnedSitesTwo')}
-
-
- {getLocale('pinnedSitesThree')}
-
-
- {getLocale('pinnedSitesFour')}
-
-
-
-
-
-
-
-
-
-
- )
- }
-
- render () {
- const { testId, type } = this.props
-
- return (
-
-
-
-
-
- {
- type === 'tips'
- ? <>
-
- {getLocale('reviewSitesMsg')}
-
-
- {getLocale('monthlyTips')}
-
- >
- :
- {getLocale('adsNotSupported')}
-
- }
-
- {
- type === 'tips'
- ?
-
- {getLocale('learnMore')}
-
-
- : null
- }
- {
- this.state.modalShown && type === 'tips'
- ? this.pinnedSitesModal()
- : null
- }
-
- )
- }
-}
diff --git a/src/features/rewards/boxAlert/spec.tsx b/src/features/rewards/boxAlert/spec.tsx
deleted file mode 100644
index 4abcf14b8..000000000
--- a/src/features/rewards/boxAlert/spec.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this file,
-* You can obtain one at http://mozilla.org/MPL/2.0/.
-*/
-
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import BoxAlert from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('BoxAlert tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#box-alert').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/boxAlert/style.ts b/src/features/rewards/boxAlert/style.ts
deleted file mode 100644
index fee8c2796..000000000
--- a/src/features/rewards/boxAlert/style.ts
+++ /dev/null
@@ -1,111 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this file,
-* You can obtain one at http://mozilla.org/MPL/2.0/.
-*/
-
-import { Type } from './index'
-import styled from '../../../theme'
-
-interface StyleProps {
- modal?: boolean
- type?: Type
-}
-
-export const StyledWrapper = styled<{}, 'div'>('div')`
- width: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- background: ${p => p.theme.palette.blue000};
- padding: 16px;
- box-shadow: 0 2px 4px rgba(0,0,0,0.2);
- border-radius: 4px;
-`
-
-export const StyledAlertIcon = styled<{}, 'div'>('div')`
- width: 24px;
- height: 24px;
- margin: 8px;
- color: ${p => p.theme.palette.blue500};
-`
-
-export const StyledInfo = styled('div')`
- font-size: 16px;
- font-family: ${p => p.theme.fontFamily.body};
- color: ${p => p.theme.color.text};
- display: flex;
- align-items: center;
-`
-
-export const StyledMessage = styled('span')`
- display: flex;
- align-items: center;
-`
-
-export const StyledMonthlyTips = styled('span')`
- padding: 4px;
- display: flex;
- align-items: center;
-`
-
-export const StyledReviewWrapper = styled<{}, 'div'>('div')`
- padding: 4px;
- display: flex;
- align-items: center;
-`
-
-export const StyledReviewList = styled<{}, 'span'>('span')`
- color: #15A4FA;
- cursor: pointer;
- font-size: 14px;
- font-weight: 500;
- letter-spacing: 0;
- line-height: 18px;
-`
-
-export const StyledModalContent = styled<{}, 'div'>('div')`
- display: block;
-`
-
-export const StyledTipsIcon = styled<{}, 'div'>('div')`
- width: 20%;
- vertical-align: top;
- margin-top: -33px;
- display: inline-block;
-`
-
-export const StyledModalInfo = styled<{}, 'div'>('div')`
- width: 80%;
- padding-left: 20px;
- display: inline-block;
-`
-
-export const StyledListMessage = styled<{}, 'div'>('div')`
- display: block;
- font-size: 16px;
- font-weight: 600;
- margin-top: 30px;
-`
-
-export const StyledList = styled<{}, 'ul'>('ul')`
- display: block;
- font-size: 14px;
- font-weight: 300;
- padding-left: 20px;
-`
-
-export const StyledListItem = styled<{}, 'li'>('li')`
- display: block;
- display: list-item;
- line-height: 28px;
- list-style-type: disc;
-`
-
-export const StyledButton = styled<{}, 'div'>('div')`
- width: 235px;
- margin: 40px auto 0 auto;
-`
-
-export const StyledButtonContainer = styled<{}, 'div'>('div')`
- width: 100%;
-`
diff --git a/src/features/rewards/categoryLikePicker/__snapshots__/spec.tsx.snap b/src/features/rewards/categoryLikePicker/__snapshots__/spec.tsx.snap
deleted file mode 100644
index da012e4e7..000000000
--- a/src/features/rewards/categoryLikePicker/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,147 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Category Like Picker tests basic tests matches the snapshot 1`] = `
-Array [
- .c0 {
- display: inline-block;
-}
-
-.c1 {
- margin: auto;
- border: none;
- height: 32px;
- width: 32px;
- outline: none;
- cursor: pointer;
- object-fit: cover;
-}
-
-.c2 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-,
- .c0 {
- display: inline-block;
-}
-
-.c6 {
- border: none;
- height: 31px;
- width: 31px;
- outline: none;
- cursor: pointer;
-}
-
-.c7 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-.c1 {
- display: inline-block;
- position: relative;
-}
-
-.c2 {
- left: 50%;
- top: calc(100% + 10px);
- -webkit-transform: translateX(-80%);
- -ms-transform: translateX(-80%);
- transform: translateX(-80%);
- white-space: nowrap;
- position: absolute;
- background: #0C0D21;
- text-align: center;
- padding: 10px;
- z-index: 2;
- border-radius: 3px;
- box-shadow: 1px 1px 5px 0 rgba(34,35,38,0.43);
- display: none;
-}
-
-.c4 {
- color: #FFFFFF;
- font-family: Muli,sans-serif;
- font-weight: 300;
- font-size: 14px;
-}
-
-.c3 {
- width: 0;
- height: 0;
- border-style: solid;
- position: absolute;
- top: -7px;
- left: calc(80% - 10px);
- border-width: 0 7px 8px 7px;
- border-color: transparent transparent #0C0D21 transparent;
-}
-
-.c5 {
- cursor: pointer;
- height: 24px;
-}
-
-
-
-
-
-
- MISSING: optOutTooltip
-
-
-
-
-
,
-]
-`;
diff --git a/src/features/rewards/categoryLikePicker/index.tsx b/src/features/rewards/categoryLikePicker/index.tsx
deleted file mode 100644
index 0b30486bb..000000000
--- a/src/features/rewards/categoryLikePicker/index.tsx
+++ /dev/null
@@ -1,125 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledCategoryActionOptinLogo,
- StyledCategoryActionOptoutLogo,
- StyledCategoryActionOptinButton,
- StyledCategoryActionOptoutButton,
- StyledCategoryActionOptinFilledButton,
- StyledCategoryActionOptoutFilledButton
-} from './style'
-import {
- HeartLIcon,
- HeartSIcon,
- BlockLIcon,
- BlockSIcon
-} from '../../../components/icons'
-import { Tooltip } from '..'
-import { getLocale } from '../../../helpers'
-
-interface State {
- itemSelected: number
-}
-
-export interface Props {
- id?: string
- optAction: number
- onOptIn?: () => void
- onOptOut?: () => void
-}
-
-export default class ThumbLikePicker extends React.PureComponent {
- constructor (props: Props) {
- super(props)
- this.state = {
- itemSelected: props.optAction
- }
- }
-
- componentWillReceiveProps (nextProps: Props) {
- if ('optAction' in nextProps) {
- this.setState({ itemSelected: nextProps.optAction })
- }
- }
-
- showCategoryLike = () => {
- return (
- <>
-
-
-
-
-
-
-
-
-
-
-
-
- >
- )
- }
-
- showCategoryBlock = () => {
- return (
- <>
-
-
-
-
-
-
-
-
-
-
-
-
- >
- )
- }
-
- showCategoryUnselected = () => {
- return (
- <>
-
-
-
-
-
-
-
-
-
-
-
-
- >
- )
- }
-
- render () {
- return (
- this.state.itemSelected === 1 ?
- this.showCategoryLike()
- :
- this.state.itemSelected === 2 ?
- this.showCategoryBlock()
- :
- this.showCategoryUnselected()
- )
- }
-}
diff --git a/src/features/rewards/categoryLikePicker/spec.tsx b/src/features/rewards/categoryLikePicker/spec.tsx
deleted file mode 100644
index c0636950b..000000000
--- a/src/features/rewards/categoryLikePicker/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import { TestThemeProvider } from '../../../theme'
-import CategoryLikePicker from './index';
-
-describe('Category Like Picker tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#categoryLikePicker').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/categoryLikePicker/style.ts b/src/features/rewards/categoryLikePicker/style.ts
deleted file mode 100644
index 10b47ff24..000000000
--- a/src/features/rewards/categoryLikePicker/style.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License. v. 2.0. If a copy of the MPL was not distributed with this file.
-* You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-
-export const StyledCategoryActionOptinLogo = styled<{}, 'div'>('div')`
- display: inline-block;
-`
-
-export const StyledCategoryActionOptoutLogo = styled<{}, 'div'>('div')`
- display: inline-block;
-`
-
-export const StyledCategoryActionOptinButton = styled<{}, 'div'>('div')`
-margin: auto;
- border: none;
- height: 32px;
- width: 32px;
- outline: none;
- cursor: pointer;
- object-fit: cover;
-`
-
-export const StyledCategoryActionOptoutButton = styled<{}, 'div'>('div')`
- border: none;
- height: 31px;
- width: 31px;
- outline: none;
- cursor: pointer;
-`
-
-export const StyledCategoryActionOptinFilledButton = styled(StyledCategoryActionOptinButton)`
- color: ${p => p.theme.palette.red500};
-`
-
-export const StyledCategoryActionOptoutFilledButton = styled(StyledCategoryActionOptoutButton)`
- color: ${p => p.theme.palette.red500};
-`
diff --git a/src/features/rewards/disabledBox/__snapshots__/spec.tsx.snap b/src/features/rewards/disabledBox/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 59cd8ef1f..000000000
--- a/src/features/rewards/disabledBox/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,94 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`DisabledBox tests basic tests matches the snapshot 1`] = `
-.c2 {
- max-width: 100%;
- width: 100%;
- min-height: auto;
- margin: 0;
- background-color: #fff;
- border-radius: 4px;
- box-shadow: 0 2px 4px rgba(0,0,0,.15);
- font-size: inherit;
- font-family: Muli,sans-serif;
- box-sizing: border-box;
- position: relative;
-}
-
-.c3 {
- padding: 32px;
-}
-
-.c0 {
- display: block;
- width: 100%;
- margin-bottom: 28px;
-}
-
-.c1 {
- font-family: Poppins,sans-serif;
-}
-
-.c4 {
- width: 541px;
- color: #4C54D2;
- font-size: 22px;
- font-weight: 600;
- -webkit-letter-spacing: 0;
- -moz-letter-spacing: 0;
- -ms-letter-spacing: 0;
- letter-spacing: 0;
- line-height: 28px;
- padding-bottom: 5px;
-}
-
-.c5 {
- color: #84889c;
- font-size: 16px;
- font-weight: normal;
- -webkit-letter-spacing: 0;
- -moz-letter-spacing: 0;
- -ms-letter-spacing: 0;
- letter-spacing: 0;
- line-height: 26px;
- padding-bottom: 0px;
- font-family: Muli,sans-serif;
-}
-
-.c5:first-of-type {
- padding-bottom: 10px;
-}
-
-
-
-
-
- MISSING: whyBraveRewards
-
-
- MISSING: rewardsOffText5
-
-
- MISSING: rewardsOffText3
-
-
- MISSING: rewardsOffText4
-
-
-
-
-`;
diff --git a/src/features/rewards/disabledBox/index.tsx b/src/features/rewards/disabledBox/index.tsx
deleted file mode 100644
index 5cebd53fd..000000000
--- a/src/features/rewards/disabledBox/index.tsx
+++ /dev/null
@@ -1,36 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this file,
-* You can obtain one at http://mozilla.org/MPL/2.0/.
-*/
-
-import * as React from 'react'
-import {
- StyledWrapper,
- StyledCard,
- StyledTitle,
- StyledText
-} from './style'
-import { getLocale } from '../../../helpers'
-
-export default class DisabledBox extends React.PureComponent<{}, {}> {
- render () {
- return (
-
-
-
- {getLocale('whyBraveRewards')}
-
-
- {getLocale('rewardsOffText5')}
-
-
- {getLocale('rewardsOffText3')}
-
-
- {getLocale('rewardsOffText4')}
-
-
-
- )
- }
-}
diff --git a/src/features/rewards/disabledBox/spec.tsx b/src/features/rewards/disabledBox/spec.tsx
deleted file mode 100644
index 8a159dcff..000000000
--- a/src/features/rewards/disabledBox/spec.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this file,
-* You can obtain one at http://mozilla.org/MPL/2.0/.
-*/
-
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import DisabledBox from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('DisabledBox tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#disabledbox').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/disabledBox/style.ts b/src/features/rewards/disabledBox/style.ts
deleted file mode 100644
index bda5e1c1d..000000000
--- a/src/features/rewards/disabledBox/style.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this file,
-* You can obtain one at http://mozilla.org/MPL/2.0/.
-*/
-
-import { ComponentType } from 'react'
-import styled from '../../../theme'
-import Card, { CardProps } from '../../../components/layout/card'
-import palette from '../../../theme/colors'
-
-export const StyledWrapper = styled<{}, 'div'>('div')`
- display: block;
- width: 100%;
- margin-bottom: 28px;
-`
-
-export const StyledCard = styled(Card as ComponentType)`
- font-family: Poppins, sans-serif;
-`
-
-export const StyledTitle = styled<{}, 'span'>('span')`
- width: 541px;
- color: ${palette.blurple500};
- font-size: 22px;
- font-weight: 600;
- letter-spacing: 0;
- line-height: 28px;
- padding-bottom: 5px;
-`
-
-export const StyledText = styled<{}, 'p'>('p')`
- color: ${palette.grey600};
- font-size: 16px;
- font-weight: normal;
- letter-spacing: 0;
- line-height: 26px;
- padding-bottom: 0px;
- font-family: Muli, sans-serif;
-
- &:first-of-type {
- padding-bottom: 10px;
- }
-`
diff --git a/src/features/rewards/disabledContent/__snapshots__/spec.tsx.snap b/src/features/rewards/disabledContent/__snapshots__/spec.tsx.snap
deleted file mode 100644
index efe0b5dda..000000000
--- a/src/features/rewards/disabledContent/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,42 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Disabled Content tests basic tests matches the snapshot 1`] = `
-.c2 {
- font-size: 16px;
- line-height: 1.7;
- padding: 8px;
-}
-
-.c0 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- padding: 0 48px;
- margin: 0 0 8px;
-}
-
-.c1 {
- width: 180px;
- padding: 4px;
-}
-
-
-`;
diff --git a/src/features/rewards/disabledContent/index.tsx b/src/features/rewards/disabledContent/index.tsx
deleted file mode 100644
index 1d8037e08..000000000
--- a/src/features/rewards/disabledContent/index.tsx
+++ /dev/null
@@ -1,62 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledContent,
- StyledTwoColumn,
- StyledIcon
-} from './style'
-import {
- AdsMegaphoneIcon,
- RewardsActivateIcon,
- RewardsSendTipsIcon
-} from '../../../components/icons'
-
-export type Type = 'ads' | 'contribute' | 'donation'
-
-export interface Props {
- children: React.ReactNode
- id?: string
- type?: Type
-}
-
-export default class DisabledContent extends React.PureComponent {
- getIcon = (type?: Type) => {
- let icon = null
-
- switch (type) {
- case 'ads':
- icon =
- break
- case 'contribute':
- icon =
- break
- case 'donation':
- icon =
- break
- }
-
- return (
-
- {icon}
-
- )
- }
-
- render () {
- const { id, children, type } = this.props
-
- return (
-
-
- {this.getIcon(type)}
-
- {children}
-
-
-
- )
- }
-}
diff --git a/src/features/rewards/disabledContent/spec.tsx b/src/features/rewards/disabledContent/spec.tsx
deleted file mode 100644
index cb06b634c..000000000
--- a/src/features/rewards/disabledContent/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import DisabledContent from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('Disabled Content tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#disabled').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/disabledContent/style.ts b/src/features/rewards/disabledContent/style.ts
deleted file mode 100644
index f2215a9d9..000000000
--- a/src/features/rewards/disabledContent/style.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from '../../../theme'
-import { Props } from './index'
-
-export const StyledContent = styled('div')`
- font-size: 16px;
- line-height: 1.7;
- padding: 8px;
-`
-
-export const StyledTwoColumn = styled<{}, 'div'>('div')`
- display: flex;
- align-items: center;
- padding: 0 48px;
- margin: 0 0 8px;
-`
-
-export const StyledIcon = styled<{}, 'div'>('div')`
- width: 180px;
- padding: 4px;
-`
diff --git a/src/features/rewards/disabledPanel/__snapshots__/spec.tsx.snap b/src/features/rewards/disabledPanel/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 38cb8bc22..000000000
--- a/src/features/rewards/disabledPanel/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,88 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`DisabledPanel tests basic tests matches the snapshot 1`] = `
-.c0 {
- width: 100%;
- padding: 30px 25px 25px;
- font-family: Poppins,sans-serif;
- background-image: linear-gradient(140deg,#392DD1 0%,#8E2995 100%);
-}
-
-.c2 {
- font-size: 16px;
- color: #F1F1F9;
- font-weight: 500;
- -webkit-letter-spacing: 0;
- -moz-letter-spacing: 0;
- -ms-letter-spacing: 0;
- letter-spacing: 0;
-}
-
-.c3 {
- font-size: 16px;
- color: #FFFFFF;
- font-weight: 600;
- -webkit-letter-spacing: 0;
- -moz-letter-spacing: 0;
- -ms-letter-spacing: 0;
- letter-spacing: 0;
- margin-left: 3px;
-}
-
-.c4 {
- color: #F1F1F9;
- font-size: 14px;
- font-family: Muli,sans-serif;
- -webkit-letter-spacing: 0;
- -moz-letter-spacing: 0;
- -ms-letter-spacing: 0;
- letter-spacing: 0;
- font-weight: 400;
- line-height: 20px;
- max-width: 276px;
- margin-top: 7px;
-}
-
-.c5 {
- cursor: pointer;
- margin-left: 4px;
- display: inline-block;
- color: #8D92E2;
-}
-
-.c1 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
-}
-
-
-
-
- MISSING: disabledPanelTitle
-
-
- MISSING: disabledPanelOff
-
-
-
-
-`;
diff --git a/src/features/rewards/disabledPanel/index.tsx b/src/features/rewards/disabledPanel/index.tsx
deleted file mode 100644
index dd72afd49..000000000
--- a/src/features/rewards/disabledPanel/index.tsx
+++ /dev/null
@@ -1,47 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this file,
-* You can obtain one at http://mozilla.org/MPL/2.0/.
-*/
-
-import * as React from 'react'
-import {
- StyledWrapper,
- StyledTitle,
- StyledOff,
- StyledText,
- StyledLink,
- StyledTitleWrapper
-} from './style'
-
-import { getLocale } from '../../../helpers'
-
-export interface Props {
- testId?: string
- isPrivate?: boolean
- onLinkOpen: () => void
-}
-
-export default class DisabledPanel extends React.PureComponent {
- render () {
- const { testId, isPrivate, onLinkOpen } = this.props
-
- return (
-
-
-
- {getLocale('disabledPanelTitle')}
-
-
- {getLocale('disabledPanelOff')}
-
-
-
- {isPrivate ? getLocale('disabledPanelPrivateText') : getLocale('disabledPanelText')}
-
- {isPrivate ? getLocale('learnMore') : getLocale('disabledPanelSettings')}
-
-
-
- )
- }
-}
diff --git a/src/features/rewards/disabledPanel/spec.tsx b/src/features/rewards/disabledPanel/spec.tsx
deleted file mode 100644
index 8c30cad88..000000000
--- a/src/features/rewards/disabledPanel/spec.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this file,
-* You can obtain one at http://mozilla.org/MPL/2.0/.
-*/
-
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import DisabledPanel from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('DisabledPanel tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#disabled-panel').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/disabledPanel/style.ts b/src/features/rewards/disabledPanel/style.ts
deleted file mode 100644
index 697ff7427..000000000
--- a/src/features/rewards/disabledPanel/style.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this file,
-* You can obtain one at http://mozilla.org/MPL/2.0/.
-*/
-
-import styled from 'styled-components'
-
-export const StyledWrapper = styled<{}, 'div'>('div')`
- width: 100%;
- padding: 30px 25px 25px;
- font-family: Poppins, sans-serif;
- background-image: linear-gradient(140deg, #392DD1 0%, #8E2995 100%);
-`
-
-export const StyledTitle = styled<{}, 'div'>('div')`
- font-size: 16px;
- color: #F1F1F9;
- font-weight: 500;
- letter-spacing: 0;
-`
-
-export const StyledOff = styled<{}, 'div'>('div')`
- font-size: 16px;
- color: #FFFFFF;
- font-weight: 600;
- letter-spacing: 0;
- margin-left: 3px;
-`
-
-export const StyledText = styled<{}, 'div'>('div')`
- color: #F1F1F9;
- font-size: 14px;
- font-family: Muli,sans-serif;
- letter-spacing: 0;
- font-weight: 400;
- line-height: 20px;
- max-width: 276px;
- margin-top: 7px;
-`
-
-export const StyledLink = styled<{}, 'a'>('a')`
- cursor: pointer;
- margin-left: 4px;
- display: inline-block;
- color: #8D92E2;
-`
-
-export const StyledTitleWrapper = styled<{}, 'div'>('div')`
- display: flex;
-`
diff --git a/src/features/rewards/donate/__snapshots__/spec.tsx.snap b/src/features/rewards/donate/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 9b6f5757b..000000000
--- a/src/features/rewards/donate/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,131 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Donate tests basic tests matches the snapshot 1`] = `
-.c0 {
- position: relative;
- font-family: Muli,sans-serif;
- margin: 0px;
- --donate-content-padding: 0 0 0 23px;
- --donate-send-bg: #392dd1;
- --donate-send-color: #fff;
- --donate-send-padding: 11px 0 10px 47px;
- --donate-funds-padding: 12px 0 11px 25px;
-}
-
-.c1 {
- margin-top: 0px;
- padding: var(--donate-content-padding);
-}
-
-.c2 {
- font-size: 16px;
- font-weight: 600;
- line-height: 1.75;
- color: #fff;
- margin-bottom: 14px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- max-width: 167px;
- padding-left: 0px;
-}
-
-.c4 {
- background: var(--donate-send-bg);
- font-size: 13px;
- font-weight: 600;
- -webkit-letter-spacing: 0.2px;
- -moz-letter-spacing: 0.2px;
- -ms-letter-spacing: 0.2px;
- letter-spacing: 0.2px;
- color: var(--donate-send-color);
- padding: var(--donate-send-padding);
- text-transform: uppercase;
- border: none;
- width: 100%;
- text-align: left;
- cursor: pointer;
-}
-
-.c6 {
- display: block;
- border: none;
- font-size: 13px;
- font-weight: 600;
- text-transform: uppercase;
- background: var(--donate-send-bg);
- cursor: pointer;
-}
-
-.c5 {
- display: block;
- width: 245px;
- margin: 0 auto;
-}
-
-.c7 {
- vertical-align: middle;
- display: inline-block;
- margin-right: 15px;
- color: #a1a8f2;
- width: 27px;
- height: 27px;
-}
-
-.c3 {
- width: 100%;
- display: block;
-}
-
-.c8 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-
-`;
diff --git a/src/features/rewards/donate/index.tsx b/src/features/rewards/donate/index.tsx
deleted file mode 100644
index b0f011b5c..000000000
--- a/src/features/rewards/donate/index.tsx
+++ /dev/null
@@ -1,157 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledWrapper,
- StyledContent,
- StyledDonationTitle,
- StyledSend,
- StyledIconSend,
- StyledIconFace,
- StyledFunds,
- StyledFundsText,
- StyledAmountsWrapper,
- StyledSendButton,
- StyledButtonWrapper
-} from './style'
-
-import Amount from '../amount/index'
-import { getLocale } from '../../../helpers'
-import { EmoteSadIcon, SendIcon } from '../../../components/icons'
-
-export type DonateType = 'big' | 'small'
-
-type Donation = {
- tokens: string,
- converted: string
-}
-
-export interface Props {
- actionText: string
- title: string
- balance: number
- donationAmounts: Donation[]
- currentAmount: string
- onDonate: (amount: string) => void
- onAmountSelection?: (tokens: string) => void
- id?: string
- donateType: DonateType
- children?: React.ReactNode
- isMobile?: boolean
- addFundsLink?: string
-}
-
-interface State {
- missingFunds: boolean
-}
-
-export default class Donate extends React.PureComponent {
- constructor (props: Props) {
- super(props)
- this.state = {
- missingFunds: false
- }
- }
-
- componentDidUpdate (prevProps: Props) {
- if (
- this.props.balance !== prevProps.balance ||
- this.props.donationAmounts !== prevProps.donationAmounts ||
- this.props.currentAmount !== prevProps.currentAmount
- ) {
- this.validateAmount(this.props.balance)
- }
- }
-
- validateDonation = () => {
- if (this.validateAmount(this.props.balance)) {
- return
- }
-
- if (this.props.onDonate) {
- this.props.onDonate(this.props.currentAmount)
- }
- }
-
- validateAmount (balance: number, tokens?: string) {
- if (tokens === undefined) {
- tokens = this.props.currentAmount
- }
-
- const valid = parseInt(tokens, 10) > balance
- this.setState({ missingFunds: valid })
- return valid
- }
-
- onAmountChange = (tokens: string) => {
- this.validateAmount(this.props.balance, tokens)
-
- if (this.props.onAmountSelection) {
- this.props.onAmountSelection(tokens)
- }
- }
-
- render () {
- const {
- id,
- donationAmounts,
- actionText,
- children,
- title,
- currentAmount,
- donateType,
- isMobile,
- addFundsLink
- } = this.props
- const disabled = parseInt(currentAmount, 10) === 0
-
- return (
-
-
- {title}
-
- {
- donationAmounts && donationAmounts.map((donation: Donation) => {
- return
- })
- }
-
- {children}
-
-
-
-
-
-
-
- {actionText}
-
-
-
- {
- this.state.missingFunds
- ?
-
-
-
-
- {getLocale('notEnoughTokens')} {getLocale('addFunds')}.
-
-
- : null
- }
-
- )
- }
-}
diff --git a/src/features/rewards/donate/spec.tsx b/src/features/rewards/donate/spec.tsx
deleted file mode 100644
index a97395291..000000000
--- a/src/features/rewards/donate/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import Donate from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('Donate tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#donate').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/donate/style.ts b/src/features/rewards/donate/style.ts
deleted file mode 100644
index 4238c0547..000000000
--- a/src/features/rewards/donate/style.ts
+++ /dev/null
@@ -1,166 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled, { css } from '../../../theme'
-import * as CSS from 'csstype'
-import { DonateType } from './index'
-
-interface Theme {
- paddingBox: CSS.PaddingProperty<1>
- sendBgColor: CSS.Color
- disabledSendColor: CSS.Color
- paddingSend: CSS.PaddingProperty<1>
- paddingFunds: CSS.PaddingProperty<1>
-}
-
-interface StyleProps {
- disabled?: boolean
- donateType?: DonateType
- isMobile?: boolean
-}
-
-const customStyle: Record = {
- big: {
- paddingBox: '0 19px 0 55px',
- sendBgColor: '#4c54d2',
- disabledSendColor: '#3e45b2',
- paddingSend: '14px 0px 13px 0px',
- paddingFunds: '13px 12px 13px 24px'
- },
- small: {
- paddingBox: '0 0 0 23px',
- sendBgColor: '#392dd1',
- disabledSendColor: '#1a22a8',
- paddingSend: '11px 0 10px 47px',
- paddingFunds: '12px 0 11px 25px'
- }
-}
-
-const getStyle = (p: StyleProps) => {
- const style = customStyle[p.donateType || 'small']
-
- return css`
- --donate-content-padding: ${style.paddingBox};
- --donate-send-bg: ${style.sendBgColor};
- --donate-send-color: ${p.disabled ? style.disabledSendColor : '#fff'};
- --donate-send-padding: ${style.paddingSend};
- --donate-funds-padding: ${style.paddingFunds};
- `
-}
-
-const getAmountStyle = (isMobile?: boolean) => {
- if (!isMobile) {
- return null
- }
-
- return css`
- display: grid;
- grid-gap: 0px;
- grid-template-columns: 1fr 1fr 1fr;
- align-items: center;
- justify-content: center;
- padding: 0px 10px;
- `
-}
-
-export const StyledWrapper = styled('div')`
- position: relative;
- font-family: ${p => p.theme.fontFamily.body};
- margin: ${p => p.isMobile ? '0 auto 8px auto' : 0}px
- ${getStyle}
-`
-
-export const StyledContent = styled('div')`
- margin-top: ${p => p.isMobile ? -30 : 0}px;
- padding: ${p => p.isMobile ? '0px' : 'var(--donate-content-padding)'};
-`
-
-export const StyledDonationTitle = styled('div')`
- font-size: 16px;
- font-weight: 600;
- line-height: 1.75;
- color: #fff;
- margin-bottom: ${p => p.isMobile ? 20 : 14}px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- max-width: 167px;
- padding-left: ${p => p.isMobile ? 20 : 0}px;
-`
-
-export const StyledSend = styled<{}, 'div'>('div')`
- background: var(--donate-send-bg);
- font-size: 13px;
- font-weight: 600;
- letter-spacing: 0.2px;
- color: var(--donate-send-color);
- padding: var(--donate-send-padding);
- text-transform: uppercase;
- border: none;
- width: 100%;
- text-align: left;
- cursor: pointer;
-`
-
-export const StyledSendButton = styled<{}, 'button'>('button')`
- display: block;
- border: none;
- font-size: 13px;
- font-weight: 600;
- text-transform: uppercase;
- background: var(--donate-send-bg);
- cursor: pointer;
-`
-
-export const StyledButtonWrapper = styled('div')`
- display: block;
- width: ${p => p.isMobile ? 190 : 245}px;
- margin: 0 auto;
-`
-
-export const StyledIconSend = styled('span')`
- vertical-align: middle;
- display: inline-block;
- margin-right: 15px;
- color: ${p => p.disabled ? p.donateType === 'small' ? '#1A22A8' : '#3e45b2' : '#a1a8f2'};
- width: 27px;
- height: 27px;
-`
-
-export const StyledFunds = styled<{}, 'div'>('div')`
- font-family: Muli, sans-serif;
- font-size: 13px;
- font-weight: 300;
- line-height: 1.69;
- color: #fff;
- padding: var(--donate-funds-padding);
- background: #1b1d2f;
- display: flex;
- position:absolute;
- bottom: 0;
- left: 0;
- z-index: 10;
- width: 100%;
-
- a {
- color: #6cc7fd;
- text-decoration: none;
- }
-`
-
-export const StyledIconFace = styled<{}, 'div'>('div')`
- flex-basis: 32px;
- margin: -7px 6px 0 0;
-`
-
-export const StyledFundsText = styled<{}, 'div'>('div')`
- flex: 1;
- margin-right: 9px;
-`
-
-export const StyledAmountsWrapper = styled('div')`
- width: 100%;
- display: block;
- ${p => getAmountStyle(p.isMobile)}
-`
diff --git a/src/features/rewards/donationOverlay/__snapshots__/spec.tsx.snap b/src/features/rewards/donationOverlay/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 791400653..000000000
--- a/src/features/rewards/donationOverlay/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,162 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`DonationOverlay tests basic tests matches the snapshot 1`] = `
-.c0 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
-}
-
-.c1 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background: rgba(12,13,33,0.85);
- font-family: Muli,sans-serif;
- -webkit-box-pack: center;
- -webkit-justify-content: center;
- -ms-flex-pack: center;
- justify-content: center;
-}
-
-.c4 {
- display: block;
-}
-
-.c5 {
- margin-top: 110px;
- padding-left: 5px;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-flex-direction: column;
- -ms-flex-direction: column;
- flex-direction: column;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
-}
-
-.c6 {
- color: #FFF;
-}
-
-.c2 {
- top: 20px;
- right: 20px;
- position: absolute;
- background: none;
- border: none;
- cursor: pointer;
- width: 24px;
- height: 24px;
- color: #FFF;
- padding: 0;
- z-index: 2;
-}
-
-.c7 {
- color: #FFFFFF;
- font-size: 28px;
- font-weight: 600;
- -webkit-letter-spacing: 0;
- -moz-letter-spacing: 0;
- -ms-letter-spacing: 0;
- letter-spacing: 0;
- line-height: 28px;
- display: block;
- margin-bottom: 10px;
-}
-
-.c8 {
- color: #FFFFFF;
- font-size: 16px;
- font-family: "Muli",sans-serif;
- font-weight: normal;
- -webkit-letter-spacing: 0;
- -moz-letter-spacing: 0;
- -ms-letter-spacing: 0;
- letter-spacing: 0;
- line-height: 28px;
- display: block;
- text-align: center;
- width: 249px;
-}
-
-.c3 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-
-
-
-
-
-
-
-
-
- MISSING: uhOh
-
-
- MISSING: donationFailureMsg
-
-
-
-
-
-`;
diff --git a/src/features/rewards/donationOverlay/index.tsx b/src/features/rewards/donationOverlay/index.tsx
deleted file mode 100644
index 60293a0d5..000000000
--- a/src/features/rewards/donationOverlay/index.tsx
+++ /dev/null
@@ -1,210 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this file,
-* You can obtain one at http://mozilla.org/MPL/2.0/.
-*/
-
-import * as React from 'react'
-import * as CSS from 'csstype'
-import {
- StyledWrapper,
- StyledHeaderText,
- StyledOverlayTop,
- StyledOverlayContent,
- StyledMessage,
- StyledIcon,
- StyledIconWrapper,
- StyledProviderImage,
- StyledFailWrapper,
- StyledCloseIcon,
- StyledFailTitle,
- StyledFailMsg,
- StyledOuterWrapper,
- StyledBackgroundCurve,
- StyledImageBorder,
- StyleSubHeaderText,
- StyledLetter,
- StyledClose,
- StyledLogoWrapper,
- StyledLogoBorder,
- StyledLogoIcon,
- StyledLogoImage,
- StyledDomainText,
- StyledDateText,
- StyledDate,
- StyledMonthlyInfo,
- StyledButtonWrapper,
- StyledTwitterShareButton
-} from './style'
-import { getLocale } from '../../../helpers'
-import { CloseCircleOIcon, LogoTwitterIcon, PaperAirplaneIcon } from '../../../components/icons'
-
-export interface Props {
- id?: string
- send?: boolean
- success?: boolean
- siteImg?: string
- domain?: string
- logoBgColor?: CSS.Color
- logo?: string
- amount?: string
- monthlyDate?: string
- onTweet?: () => void
- onClose: () => void
-}
-
-export default class DonationOverlay extends React.PureComponent {
-
- getFailureContent () {
- return (
-
-
-
-
-
- {getLocale('uhOh')}
-
-
- {getLocale('donationFailureMsg')}
-
-
- )
- }
-
- getOverlayContent = () => {
- const {
- success,
- send,
- siteImg,
- logo,
- domain,
- logoBgColor,
- amount,
- monthlyDate,
- onTweet
- } = this.props
- return (
-
- {
- success || send
- ?
-
- {
- send
- ?
-
-
- : null
- }
- {
- !send && siteImg
- ?
-
-
- : null
- }
- {
- !send && !siteImg && !logo && domain
- ?
- {(domain && domain.substring(0, 1)) || ''}
-
- : null
- }
- {
- !send && !siteImg && logo
- ?
-
-
-
-
- : null
- }
-
-
-
- {
- send
- ? getLocale('donationSent')
- : null
- }
- {
- success
- ? <>
- {getLocale('thankYou')}
-
-
- {
- monthlyDate
- ? getLocale('autoTipText')
- : getLocale('tipText')
- }
-
-
- {domain}
{amount} {getLocale('bat')}
- {
- monthlyDate
- ? `, ${getLocale('monthlyText')}`
- : null
- }
-
- {
- monthlyDate
- ? <>
-
- {getLocale('firstTipDateText')}
-
-
- {monthlyDate}
-
- >
- : null
- }
-
- {
- onTweet
- ? <>
-
- {getLocale('tellOthers')}
-
-
-
- {getLocale('tweetNow')}
-
-
-
-
-
- >
- : null
- }
- >
- : null
- }
-
-
-
- : this.getFailureContent()
- }
-
- )
- }
-
- render () {
- const { id, send, onClose } = this.props
-
- return (
-
- {
- send
- ?
- : null
- }
-
-
-
-
- {this.getOverlayContent()}
-
-
- )
- }
-}
diff --git a/src/features/rewards/donationOverlay/spec.tsx b/src/features/rewards/donationOverlay/spec.tsx
deleted file mode 100644
index 5cfa1cd62..000000000
--- a/src/features/rewards/donationOverlay/spec.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this file,
-* You can obtain one at http://mozilla.org/MPL/2.0/.
-*/
-
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import DonationOverlay from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('DonationOverlay tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#donationoverlay').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/donationOverlay/style.ts b/src/features/rewards/donationOverlay/style.ts
deleted file mode 100644
index 275df778d..000000000
--- a/src/features/rewards/donationOverlay/style.ts
+++ /dev/null
@@ -1,257 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this file,
-* You can obtain one at http://mozilla.org/MPL/2.0/.
-*/
-
-import styled from '../../../theme'
-import * as CSS from 'csstype'
-
-interface StyleProps {
- bg?: string
- src?: string
- success?: boolean
- monthly?: string
- logoBgColor?: CSS.Color
-}
-
-export const StyledOuterWrapper = styled<{}, 'div'>('div')`
- display: flex;
-`
-
-export const StyledWrapper = styled<{}, 'div'>('div')`
- display: flex;
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background: rgba(12,13,33,0.85);
- font-family: ${p => p.theme.fontFamily.body};
- justify-content: center;
-`
-
-export const StyledHeaderText = styled<{}, 'span'>('span')`
- color: #D1D1DB;
- font-size: 38px;
- font-weight: 600;
- letter-spacing: 0;
- line-height: 28px;
-`
-
-export const StyledOverlayTop = styled<{}, 'div'>('div')`
- display: flex;
- flex-direction: row;
- padding-top: 110px;
-`
-
-export const StyledOverlayContent = styled<{}, 'div'>('div')`
- display: block;
-`
-
-export const StyledIconWrapper = styled('span')`
- flex: 1 0 0;
- margin-top: ${p => p.success ? 0 : '-25px'}
-`
-
-export const StyledIcon = styled<{}, 'span'>('span')`
- width: 90px;
- margin-top: -7px;
- margin-right: 9px;
- display: inline-block;
-`
-
-export const StyledMessage = styled('div')`
- flex: 9 0 0;
- padding-top: 10px;
- text-align: ${p => p.monthly ? 'center' : 'inherit'};
- margin-right: ${p => p.success ? 0 : '-10px'}
-`
-
-export const StyledProviderImage = styled('div')`
- width: 90px;
- height: 90px;
- padding: 0 20px;
- border-radius: 50%;
- margin-right: 25px;
- background-repeat: no-repeat;
- background-size: 90px;
- background-image:url(${p => p.src ? p.src : ''});
-`
-
-export const StyledImageBorder = styled<{}, 'div'>('div')`
- position: relative;
- top: 0;
- left: -20px;
- width: 90px;
- height: 90px;
- border-radius: 50%;
- border: 5px solid #ffffff;
-`
-
-export const StyledFailWrapper = styled<{}, 'div'>('div')`
- margin-top: 110px;
- padding-left: 5px;
- display: flex;
- flex-direction: column;
- align-items: center;
-`
-
-export const StyledCloseIcon = styled<{}, 'span'>('span')`
- color: #FFF;
-`
-
-export const StyledClose = styled<{}, 'button'>('button')`
- top: 20px;
- right: 20px;
- position: absolute;
- background: none;
- border: none;
- cursor: pointer;
- width: 24px;
- height: 24px;
- color: #FFF;
- padding: 0;
- z-index: 2;
-`
-
-export const StyledFailTitle = styled<{}, 'span'>('span')`
- color: #FFFFFF;
- font-size: 28px;
- font-weight: 600;
- letter-spacing: 0;
- line-height: 28px;
- display: block;
- margin-bottom: 10px;
-`
-
-export const StyledFailMsg = styled<{}, 'span'>('span')`
- color: #FFFFFF;
- font-size: 16px;
- font-family: "Muli", sans-serif;
- font-weight: normal;
- letter-spacing: 0;
- line-height: 28px;
- display: block;
- text-align: center;
- width: 249px;
-`
-
-export const StyledBackgroundCurve = styled<{}, 'div'>('div')`
- position: fixed;
- top: 0;
- left: -19px;
- width: 105%;
- height: 480px;
- background: #191A2E;
- border-bottom-left-radius: 50%;
- border-bottom-right-radius: 140%;
-`
-
-export const StyleSubHeaderText = styled<{}, 'div'>('div')`
- font-size: 16px;
- font-family: "Muli", sans-serif;
- font-weight: normal;
- letter-spacing: 0;
- line-height: 28px;
- display: block;
- margin: 10px 0 0 5px;
-`
-export const StyledLetter = styled('div')`
- border: 6px solid #fff;
- border-radius: 50%;
- width: 102px;
- height: 102px;
- background: ${p => p.logoBgColor || '#DE4D26'};
- overflow: hidden;
- margin: -12px 25px 0 0;
- color: #fff;
- text-align: center;
- line-height: 90px;
- font-size: 65px;
- text-transform: uppercase;
-`
-
-export const StyledLogoImage = styled('div')`
- width: 90px;
- height: 90px;
- background: url(${p => p.bg}) no-repeat;
- background-size: cover;
-`
-
-export const StyledLogoWrapper = styled<{}, 'div'>('div')`
- padding-right: 25px;
- flex-basis: 217px;
-`
-
-export const StyledLogoBorder = styled('div')`
- border: 6px solid #fff;
- border-radius: 50%;
- width: 102px;
- height: 102px;
- margin-top: -12px;
- background: ${p => p.bg || '#DE4D26'};
- overflow: hidden;
-`
-
-export const StyledMonthlyInfo = styled<{}, 'div'>('div')`
- color: #fff;
-`
-
-export const StyledDomainText = styled<{}, 'span'>('span')`
- display: block;
- font-size: 22px;
- margin: 10px 0 25px;
- font-weight: normal;
- letter-spacing: 0;
- line-height: 32px;
-`
-
-export const StyledDateText = styled<{}, 'span'>('span')`
- display: block;
- font-size: 16px;
- font-weight: normal;
- text-align: center;
- letter-spacing: 0;
- line-height: 28px;
-`
-
-export const StyledDate = styled<{}, 'span'>('span')`
- display: block;
- font-size: 16px;
- font-weight: 500;
- text-align: center;
- letter-spacing: 0;
- line-height: 28px;
- color: ${p => p.theme.color.brandBrave};
-`
-
-export const StyledTwitterShareButton = styled<{}, 'button'>('button')`
- box-sizing: border-box;
- background: #38A1F3;
- border: none;
- color: white;
- outline-color: transparent;
- display: flex;
- flex-direction: row-reverse;
- justify-content: center;
- align-items: center;
- font-family: Poppins, sans-serif;
- user-select: none;
- font-size: 13px;
- border-radius: 20px;
- width: auto;
- min-width: 100px;
- padding: 7px 10px;
-`
-
-export const StyledLogoIcon = styled<{}, 'div'>('div')`
- width: 20px;
- height: 20px;
- margin-right: 10px;
-`
-
-export const StyledButtonWrapper = styled<{}, 'div'>('div')`
- display: flex;
- margin-top: 20px;
- justify-content: center;
-`
diff --git a/src/features/rewards/dropMenu/__snapshots__/spec.tsx.snap b/src/features/rewards/dropMenu/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 9fb55a4cb..000000000
--- a/src/features/rewards/dropMenu/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,37 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Drop Menu tests basic tests matches the snapshot 1`] = `
-.c0 {
- width: 32px;
- height: 32px;
- display: inline-block;
- padding: 2px;
- position: relative;
- border: none;
- outline: none;
-}
-
-.c1 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-
-`;
diff --git a/src/features/rewards/dropMenu/index.tsx b/src/features/rewards/dropMenu/index.tsx
deleted file mode 100644
index fab8574eb..000000000
--- a/src/features/rewards/dropMenu/index.tsx
+++ /dev/null
@@ -1,108 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledAdMenuDropContent,
- StyledAdStatBulletMenuIcon,
- StyledAdMenuOptionDropContent,
- StyledAdMenuOptionDropContentText
-} from './style'
-import { MoreVertLIcon } from '../../../components/icons'
-import { getLocale } from '../../../helpers'
-
-interface State {
- menuOpen: boolean
-}
-
-export interface Props {
- id?: string
- currentlySaved: boolean
- currentlyFlagged: boolean
- onMenuSave?: () => void
- onMenuFlag?: () => void
-}
-
-export default class DropMenu extends React.PureComponent {
- private container: React.RefObject
- constructor (props: Props) {
- super(props)
- this.state = {
- menuOpen: false
- }
- this.container = React.createRef()
- }
-
- componentDidMount () {
- document.addEventListener('mousedown', this.handleClickOutside)
- }
-
- componentWillUnmount () {
- document.removeEventListener('mousedown', this.handleClickOutside)
- }
-
- handleClickOutside = (event: MouseEvent) => {
- if (this.container.current && !this.container.current.contains(event.target as Element)) {
- this.setState({
- menuOpen: false
- })
- }
- }
-
- showMenu = () => {
- this.setState({
- menuOpen: !this.state.menuOpen
- })
- }
-
- render () {
- const { onMenuFlag, onMenuSave, currentlySaved, currentlyFlagged } = this.props
- return (
-
-
-
- {
- this.state.menuOpen ?
-
-
- {
- !currentlySaved ?
-
- {
- getLocale('saveAd')
- }
-
- :
-
- {
- getLocale('removeAdFromSaved')
- }
-
- }
-
-
- {
- !currentlyFlagged ?
-
- {
- getLocale('markAsInappropriate')
- }
-
- :
-
- {
- getLocale('markAsInappropriateChecked')
- }
-
- }
-
-
- :
- null
- }
-
-
- )
- }
-}
diff --git a/src/features/rewards/dropMenu/spec.tsx b/src/features/rewards/dropMenu/spec.tsx
deleted file mode 100644
index bebf9a6c8..000000000
--- a/src/features/rewards/dropMenu/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import { TestThemeProvider } from '../../../theme'
-import DropMenu from './index';
-
-describe('Drop Menu tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#dropMenu').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/dropMenu/style.ts b/src/features/rewards/dropMenu/style.ts
deleted file mode 100644
index 5e05a15d4..000000000
--- a/src/features/rewards/dropMenu/style.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License. v. 2.0. If a copy of the MPL was not distributed with this file.
-* You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-
-export const StyledAdMenuDropContent = styled<{}, 'div'>('div')`
- display: block;
- position: absolute;
- box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
- z-index: 1;
- margin-top: -10px;
- background-color: ${p => p.theme.color.contextMenuBackground};
- border: 1px solid;
- border-color: ${p => p.theme.color.inputBorder};
- border-radius: 5px;
- min-width: 200px;
-`
-
-export const StyledAdStatBulletMenuIcon = styled<{}, 'div'>('div')`
- width: 32px;
- height: 32px;
- display: inline-block;
- padding: 2px;
- position: relative;
- border: none;
- outline: none;
-`
-
-export const StyledAdMenuOptionDropContent = styled<{}, 'div'>('div')`
- display: flex;
- align-items: center;
- height: 35px;
- padding-left: 5px;
- margin-top: auto;
- cursor: pointer;
- &:hover {
- background-color: ${p => p.theme.color.brandBraveLight};
- }
-`
-
-export const StyledAdMenuOptionDropContentText = styled<{}, 'span'>('span')`
- font-size: 16px;
- vertical-align: middle;
- font-weight: 600;
-`
diff --git a/src/features/rewards/grantCaptcha/__snapshots__/spec.tsx.snap b/src/features/rewards/grantCaptcha/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 31beb28b1..000000000
--- a/src/features/rewards/grantCaptcha/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,94 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Grant captcha tests basic tests matches the snapshot 1`] = `
-.c0 {
- text-align: center;
- margin: 15px 0 0 -32px;
- width: 333px;
-}
-
-.c5 {
- width: 333px;
- height: 296px;
-}
-
-.c1 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-box-pack: center;
- -webkit-justify-content: center;
- -ms-flex-pack: center;
- justify-content: center;
-}
-
-.c2 {
- -webkit-flex-basis: 80px;
- -ms-flex-preferred-size: 80px;
- flex-basis: 80px;
- -webkit-flex-shrink: 0;
- -ms-flex-negative: 0;
- flex-shrink: 0;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-box-pack: center;
- -webkit-justify-content: center;
- -ms-flex-pack: center;
- justify-content: center;
-}
-
-.c4 {
- -webkit-flex-basis: 130px;
- -ms-flex-preferred-size: 130px;
- flex-basis: 130px;
- font-family: Muli,sans-serif;
- font-size: 14px;
- line-height: 1.29;
- color: #686978;
- text-align: left;
- padding-left: 13px;
-}
-
-.c3 {
- width: 60px;
- height: 52px;
-}
-
-
-
-
-
-
-
- MISSING: dndCaptchaText1
-
-
-
- MISSING: dndCaptchaText2
-
-
-
-
-`;
diff --git a/src/features/rewards/grantCaptcha/assets/bat.png b/src/features/rewards/grantCaptcha/assets/bat.png
deleted file mode 100644
index 137ab2722..000000000
Binary files a/src/features/rewards/grantCaptcha/assets/bat.png and /dev/null differ
diff --git a/src/features/rewards/grantCaptcha/index.tsx b/src/features/rewards/grantCaptcha/index.tsx
deleted file mode 100644
index f74a62a5a..000000000
--- a/src/features/rewards/grantCaptcha/index.tsx
+++ /dev/null
@@ -1,118 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledWrapper,
- StyledDropArea,
- StyledDrag,
- StyledText,
- StyledImageWrap,
- StyledImage
-} from './style'
-import { getLocale } from '../../../helpers'
-
-import batUrl from './assets/bat.png'
-
-export interface Props {
- id?: string
- isPanel?: true
- isWindows?: boolean
- onSolution: (x: number, y: number) => void
- dropBgImage: string
- hint: string
-}
-
-export default class GrantCaptcha extends React.PureComponent {
- private readonly offset: number
- private dndStartPosition: { x: number; y: number; width: number; height: number }
- private captchaBox: HTMLDivElement | null
- private captchaDrag: HTMLDivElement | null
-
- constructor (props: Props) {
- super(props)
- this.captchaBox = null
- this.captchaDrag = null
- this.offset = 5
- this.dndStartPosition = {
- x: 0,
- y: 0,
- width: 0,
- height: 0
- }
- }
-
- onCaptchaDrop = (event: React.DragEvent) => {
- event.preventDefault()
- if (!this.captchaBox || !this.captchaDrag) {
- return
- }
-
- const target = this.captchaBox.getBoundingClientRect()
- const captchaDrag = this.captchaDrag.getBoundingClientRect()
-
- let x = event.clientX - target.left - this.dndStartPosition.x + (this.dndStartPosition.width / 2)
- let y = event.clientY - target.top - this.dndStartPosition.y + (this.dndStartPosition.height / 2) - captchaDrag.height
-
- if (this.props.isWindows) {
- const dpr = window.devicePixelRatio
- const factor = (dpr <= 1) ? 0 : (this.offset * dpr)
- x = Math.round(x + factor)
- y = Math.round(y + factor)
- }
-
- this.props.onSolution(x, y)
- }
-
- onCaptchaDrag = (event: any) => {
- if (!event || !event.target) {
- return
- }
-
- const target = event.target.getBoundingClientRect()
- this.dndStartPosition = {
- x: event.clientX - target.left,
- y: event.clientY - target.top,
- width: target.width,
- height: target.height
- }
- }
-
- preventDefault (event: React.DragEvent) {
- event.preventDefault()
- }
-
- refWrapper = (node: HTMLDivElement) => {
- this.captchaBox = node
- }
-
- refDrag = (node: HTMLDivElement) => {
- this.captchaDrag = node
- }
-
- render () {
- const { id, isPanel, dropBgImage, hint } = this.props
-
- return (
-
-
-
-
-
- {
- !isPanel
- ?
- {getLocale('dndCaptchaText1')} {hint} {getLocale('dndCaptchaText2')}
-
- : null
- }
-
-
-
- )
- }
-}
diff --git a/src/features/rewards/grantCaptcha/spec.tsx b/src/features/rewards/grantCaptcha/spec.tsx
deleted file mode 100644
index d35516d54..000000000
--- a/src/features/rewards/grantCaptcha/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import GrantCaptcha from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('Grant captcha tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#captcha').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/grantCaptcha/style.ts b/src/features/rewards/grantCaptcha/style.ts
deleted file mode 100644
index e5cb42ddc..000000000
--- a/src/features/rewards/grantCaptcha/style.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-
-export const StyledWrapper = styled<{}, 'div'>('div')`
- text-align: center;
- margin: 15px 0 0 -32px;
- width: 333px;
-`
-
-export const StyledDropArea = styled<{}, 'img'>('img')`
- width: 333px;
- height: 296px;
-`
-
-export const StyledDrag = styled<{}, 'div'>('div')`
- display: flex;
- justify-content: center;
-`
-
-export const StyledImageWrap = styled<{}, 'div'>('div')`
- flex-basis: 80px;
- flex-shrink: 0;
- display: flex;
- justify-content: center;
-`
-
-export const StyledText = styled<{}, 'div'>('div')`
- flex-basis: 130px;
- font-family: Muli, sans-serif;
- font-size: 14px;
- line-height: 1.29;
- color: #686978;
- text-align: left;
- padding-left: 13px;
-`
-
-export const StyledImage = styled<{}, 'img'>('img')`
- width: 60px;
- height: 52px;
-`
diff --git a/src/features/rewards/grantClaim/__snapshots__/spec.tsx.snap b/src/features/rewards/grantClaim/__snapshots__/spec.tsx.snap
deleted file mode 100644
index d3e5f6511..000000000
--- a/src/features/rewards/grantClaim/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,96 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Grant claim tests basic tests matches the snapshot 1`] = `
-.c0 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- -webkit-flex-wrap: nowrap;
- -ms-flex-wrap: nowrap;
- flex-wrap: nowrap;
- border-radius: 8px;
- background-color: #fff;
- overflow: hidden;
- padding-left: 20px;
- margin-bottom: 19px;
- width: 100%;
- box-shadow: 0 2px 4px rgba(0,0,0,0.2);
-}
-
-.c1 {
- -webkit-flex-basis: 42px;
- -ms-flex-preferred-size: 42px;
- flex-basis: 42px;
- height: 42px;
- width: 52px;
- -webkit-flex-shrink: 0;
- -ms-flex-negative: 0;
- flex-shrink: 0;
- color: #FF9868;
-}
-
-.c2 {
- -webkit-box-flex: 1;
- -webkit-flex-grow: 1;
- -ms-flex-positive: 1;
- flex-grow: 1;
- -webkit-flex-shrink: 1;
- -ms-flex-negative: 1;
- flex-shrink: 1;
- -webkit-flex-basis: 70%;
- -ms-flex-preferred-size: 70%;
- flex-basis: 70%;
- font-size: 14px;
- font-weight: 400;
- line-height: 1.25;
- color: #686978;
- padding: 0 10px;
-}
-
-.c3 {
- -webkit-flex-basis: 90px;
- -ms-flex-preferred-size: 90px;
- flex-basis: 90px;
- height: 64px;
- background-color: #fb542b;
- font-size: 12px;
- line-height: 1.83;
- -webkit-letter-spacing: 0.8px;
- -moz-letter-spacing: 0.8px;
- -ms-letter-spacing: 0.8px;
- letter-spacing: 0.8px;
- color: #fff;
- border: none;
- text-transform: uppercase;
- cursor: pointer;
- font-weight: 600;
-}
-
-.c3:focus {
- outline: none;
-}
-
-
-
-
- MISSING: earningsClaimDefault
-
-
-
-`;
diff --git a/src/features/rewards/grantClaim/index.tsx b/src/features/rewards/grantClaim/index.tsx
deleted file mode 100644
index 631d5f704..000000000
--- a/src/features/rewards/grantClaim/index.tsx
+++ /dev/null
@@ -1,82 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import { StyledWrapper, StyledIcon, StyledText, StyledClaim, StyledLoader } from './style'
-import { getLocale } from '../../../helpers'
-import { GiftIcon, LoaderIcon, MegaphoneIcon } from '../../../components/icons'
-
-export type Type = 'ads' | 'ugp'
-
-export interface Props {
- id?: string
- testId?: string
- isMobile?: boolean
- onClaim: () => void
- type: Type
- amount?: string
- loading?: boolean
-}
-
-export default class GrantClaim extends React.PureComponent {
- getIcon = (type: Type) => {
- let icon = null
-
- switch (type) {
- case 'ads':
- icon =
- break
- case 'ugp':
- icon =
- break
- }
-
- return icon
- }
-
- getGrantText = (type: Type, amount?: string) => {
- if (type === 'ugp') {
- return getLocale('newGrant')
- }
-
- if (!amount) {
- return getLocale('earningsClaimDefault')
- }
-
- const formattedAmount = `${amount} ${getLocale('earningsClaimBat')}`
-
- return (
- <>
- {getLocale('earningsClaimOne')} {formattedAmount} {getLocale('earningsClaimTwo')}
- >
- )
- }
-
- render () {
- const { id, testId, isMobile, onClaim, type, amount, loading } = this.props
-
- return (
-
-
- {this.getIcon(type)}
-
-
- {this.getGrantText(type, amount)}
-
-
- {
- loading
- ?
-
-
- : getLocale('claim')
- }
-
-
- )
- }
-}
diff --git a/src/features/rewards/grantClaim/spec.tsx b/src/features/rewards/grantClaim/spec.tsx
deleted file mode 100644
index 325f6a6ee..000000000
--- a/src/features/rewards/grantClaim/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import GrantClaim from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('Grant claim tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#claim').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/grantClaim/style.ts b/src/features/rewards/grantClaim/style.ts
deleted file mode 100644
index e43593ea0..000000000
--- a/src/features/rewards/grantClaim/style.ts
+++ /dev/null
@@ -1,68 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import { Type } from './'
-import styled from 'styled-components'
-
-interface StyleProps {
- type?: Type
- isMobile?: boolean
-}
-
-export const StyledWrapper = styled('div')`
- display: flex;
- align-items: center;
- flex-wrap: nowrap;
- border-radius: 8px;
- background-color: #fff;
- overflow: hidden;
- padding-left: 20px;
- margin-bottom: ${p => p.isMobile ? 15 : 19}px;
- width: 100%;
- box-shadow: 0 2px 4px rgba(0,0,0,0.2);
-`
-
-export const StyledIcon = styled('div')`
- flex-basis: 42px;
- height: 42px;
- width: 52px;
- flex-shrink: 0;
- color: ${p => p.type === 'ads' ? '#C12D7C' : '#FF9868'};
-`
-
-export const StyledText = styled<{}, 'div'>('div')`
- flex-grow: 1;
- flex-shrink: 1;
- flex-basis: 70%;
- font-size: 14px;
- font-weight: 400;
- line-height: 1.25;
- color: #686978;
- padding: 0 10px;
-`
-
-export const StyledClaim = styled<{}, 'button'>('button')`
- flex-basis: 90px;
- height: 64px;
- background-color: #fb542b;
- font-size: 12px;
- line-height: 1.83;
- letter-spacing: 0.8px;
- color: #fff;
- border: none;
- text-transform: uppercase;
- cursor: pointer;
- font-weight: 600;
-
- &:focus {
- outline: none;
- }
-`
-
-export const StyledLoader = styled<{}, 'span'>('span')`
- width: 35px;
- height: 35px;
- margin-top: 7px;
- display: inline-block;
-`
diff --git a/src/features/rewards/grantComplete/__snapshots__/spec.tsx.snap b/src/features/rewards/grantComplete/__snapshots__/spec.tsx.snap
deleted file mode 100644
index df3d6e4c8..000000000
--- a/src/features/rewards/grantComplete/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,144 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Grant complete tests basic tests matches the snapshot 1`] = `
-.c0 {
- text-align: center;
- width: 100%;
- margin: 40px 0 0;
-}
-
-.c1 {
- border-radius: 6px;
- background-color: #f1f1f5;
- padding: 5px 10px 20px;
-}
-
-.c2 {
- font-size: 14px;
- font-weight: 300;
- line-height: 1.57;
- color: #838391;
- margin: 11px 0 5px;
-}
-
-.c3 {
- font-size: 18px;
- line-height: 1.22;
- text-align: center;
- color: #c12d7c;
-}
-
-.c4 {
- margin-top: 32px;
-}
-
-.c6 {
- --button-main-color: #FB542B;
- --button-main-color-hover: #FB542B;
- --button-main-color-active: #ffb8a6;
- --button-state-color: var(--button-main-color);
- --icon-size: 18px;
- --icon-spacing: 6px;
- --webkit-appearance: none;
- box-sizing: border-box;
- background: none;
- border: none;
- outline-color: transparent;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-flex-direction: row-reverse;
- -ms-flex-direction: row-reverse;
- flex-direction: row-reverse;
- -webkit-box-pack: center;
- -webkit-justify-content: center;
- -ms-flex-pack: center;
- justify-content: center;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- font-family: Poppins,sans-serif;
- cursor: pointer;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- font-size: 14px;
- border-radius: 28px;
- width: 100%;
- min-width: 235px;
- padding: 19px 15px;
-}
-
-.c6:hover:enabled {
- --button-state-color: var(--button-main-color-hover);
-}
-
-.c6:active:enabled {
- --button-state-color: var(--button-main-color-active);
-}
-
-.c5 {
- color: #fff;
- background: var(--button-state-color);
- border: 1px solid var(--button-state-color);
-}
-
-.c7 {
- min-height: var(--icon-size);
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- text-align: center;
- -webkit-letter-spacing: 0;
- -moz-letter-spacing: 0;
- -ms-letter-spacing: 0;
- letter-spacing: 0;
- font-weight: 500;
- text-transform: uppercase;
- line-height: 1;
-}
-
-
-`;
diff --git a/src/features/rewards/grantComplete/index.tsx b/src/features/rewards/grantComplete/index.tsx
deleted file mode 100644
index 89bffa0c2..000000000
--- a/src/features/rewards/grantComplete/index.tsx
+++ /dev/null
@@ -1,64 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledWrapper,
- StyledBox,
- StyledTitle,
- StyledValue,
- StyledText,
- StyledButtonWrapper
-} from './style'
-import { getLocale } from '../../../helpers'
-import Button from '../../../components/buttonsIndicators/button'
-
-export interface Props {
- id?: string
- testId?: string
- onClose: () => void
- amount: string
- date: string
- isMobile?: boolean
- tokenTitle?: string
-}
-
-export default class GrantComplete extends React.PureComponent {
- render () {
- const { id, testId, onClose, amount, date, isMobile, tokenTitle } = this.props
-
- return (
-
-
- {tokenTitle}
- {amount} BAT
- {
- date && date.length > 0
- ? <>
- {getLocale('grantExpire')}
- {date}
- >
- : null
- }
-
- {
- !isMobile && date && date.length > 0
- ?
- {getLocale('grantDisclaimer')}
-
- : null
- }
-
-
-
-
- )
- }
-}
diff --git a/src/features/rewards/grantComplete/spec.tsx b/src/features/rewards/grantComplete/spec.tsx
deleted file mode 100644
index b225c4830..000000000
--- a/src/features/rewards/grantComplete/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import GrantComplete from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('Grant complete tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#complete').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/grantComplete/style.ts b/src/features/rewards/grantComplete/style.ts
deleted file mode 100644
index 578b560b5..000000000
--- a/src/features/rewards/grantComplete/style.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-
-interface StyleProps {
- isMobile?: boolean
-}
-
-export const StyledWrapper = styled<{}, 'div'>('div')`
- text-align: center;
- width: 100%;
- margin: 40px 0 0;
-`
-
-export const StyledBox = styled<{}, 'div'>('div')`
- border-radius: 6px;
- background-color: #f1f1f5;
- padding: 5px 10px 20px;
-`
-
-export const StyledTitle = styled<{}, 'div'>('div')`
- font-size: 14px;
- font-weight: 300;
- line-height: 1.57;
- color: #838391;
- margin: 11px 0 5px;
-`
-
-export const StyledValue = styled<{}, 'div'>('div')`
- font-size: 18px;
- line-height: 1.22;
- text-align: center;
- color: #c12d7c;
-`
-
-export const StyledText = styled<{}, 'div'>('div')`
- font-family: Muli, sans-serif;
- font-size: 14px;
- line-height: 1.29;
- color: #838391;
- margin: 44px 0 0;
-`
-
-export const StyledButtonWrapper = styled('div')`
- margin-top: ${p => p.isMobile ? 40 : 32}px;
-`
diff --git a/src/features/rewards/grantError/__snapshots__/spec.tsx.snap b/src/features/rewards/grantError/__snapshots__/spec.tsx.snap
deleted file mode 100644
index e00ca4c1e..000000000
--- a/src/features/rewards/grantError/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,95 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Grant error tests basic tests matches the snapshot 1`] = `
-.c4 {
- --button-main-color: #FB542B;
- --button-main-color-hover: #FB542B;
- --button-main-color-active: #ffb8a6;
- --button-state-color: var(--button-main-color);
- --icon-size: 18px;
- --icon-spacing: 6px;
- --webkit-appearance: none;
- box-sizing: border-box;
- background: none;
- border: none;
- outline-color: transparent;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-flex-direction: row-reverse;
- -ms-flex-direction: row-reverse;
- flex-direction: row-reverse;
- -webkit-box-pack: center;
- -webkit-justify-content: center;
- -ms-flex-pack: center;
- justify-content: center;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- font-family: Poppins,sans-serif;
- cursor: pointer;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- font-size: 14px;
- border-radius: 28px;
- width: 100%;
- min-width: 235px;
- padding: 19px 15px;
-}
-
-.c4:hover:enabled {
- --button-state-color: var(--button-main-color-hover);
-}
-
-.c4:active:enabled {
- --button-state-color: var(--button-main-color-active);
-}
-
-.c3 {
- color: #fff;
- background: var(--button-state-color);
- border: 1px solid var(--button-state-color);
-}
-
-.c0 {
- text-align: center;
- width: 100%;
- padding: 20px 10px;
- min-height: 350px;
-}
-
-.c1 {
- font-family: Muli,sans-serif;
- font-size: 14px;
- line-height: 1.29;
- color: #838391;
- margin: 44px 0 32px;
-}
-
-.c2 {
- display: block;
- margin: 0 auto;
-}
-
-
-`;
diff --git a/src/features/rewards/grantError/index.tsx b/src/features/rewards/grantError/index.tsx
deleted file mode 100644
index 509fb1645..000000000
--- a/src/features/rewards/grantError/index.tsx
+++ /dev/null
@@ -1,36 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import Button from '../../../components/buttonsIndicators/button'
-import { StyledWrapper, StyledText, StyledButton } from './style'
-
-export interface Props {
- id?: string
- text?: string
- buttonText: string
- onButtonClick: () => void
-}
-
-export default class GrantError extends React.PureComponent {
- render () {
- const { id, text, buttonText, onButtonClick } = this.props
-
- return (
-
-
- {text}
-
-
-
-
-
- )
- }
-}
diff --git a/src/features/rewards/grantError/spec.tsx b/src/features/rewards/grantError/spec.tsx
deleted file mode 100644
index 7261ec190..000000000
--- a/src/features/rewards/grantError/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import GrantError from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('Grant error tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#error').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/grantError/style.ts b/src/features/rewards/grantError/style.ts
deleted file mode 100644
index 57c5bdfa9..000000000
--- a/src/features/rewards/grantError/style.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-
-export const StyledWrapper = styled<{}, 'div'>('div')`
- text-align: center;
- width: 100%;
- padding: 20px 10px;
- min-height: 350px;
-`
-
-export const StyledText = styled<{}, 'div'>('div')`
- font-family: Muli, sans-serif;
- font-size: 14px;
- line-height: 1.29;
- color: #838391;
- margin: 44px 0 32px;
-`
-
-export const StyledButton = styled<{}, 'div'>('div')`
- display: block;
- margin: 0 auto;
-`
diff --git a/src/features/rewards/grantWrapper/__snapshots__/spec.tsx.snap b/src/features/rewards/grantWrapper/__snapshots__/spec.tsx.snap
deleted file mode 100644
index d3220494c..000000000
--- a/src/features/rewards/grantWrapper/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,358 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Grant wrapper tests basic tests matches the snapshot 1`] = `
-.c0 {
- position: absolute;
- top: 0;
- left: 0;
- z-index: 6;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-align-items: stretch;
- -webkit-box-align: stretch;
- -ms-flex-align: stretch;
- align-items: stretch;
- -webkit-align-content: flex-start;
- -ms-flex-line-pack: start;
- align-content: flex-start;
- -webkit-flex-wrap: wrap;
- -ms-flex-wrap: wrap;
- flex-wrap: wrap;
- overflow: hidden;
- width: 100%;
- padding: 0 52px 20px;
- border-radius: 6px;
- height: auto;
- overflow-y: hidden;
- background: rgba(255,255,255,0.95);
-}
-
-.c3 {
- text-align: center;
- width: 100%;
- margin: 59px 0;
-}
-
-.c4 {
- width: 100%;
- font-size: 28px;
- font-weight: 500;
- line-height: 1.29;
- -webkit-letter-spacing: -0.2px;
- -moz-letter-spacing: -0.2px;
- -ms-letter-spacing: -0.2px;
- letter-spacing: -0.2px;
- text-align: center;
- color: #fb542b;
-}
-
-.c1 {
- top: 16px;
- right: 16px;
- position: absolute;
- padding: 0;
- border: none;
- background: none;
- cursor: pointer;
- color: #9E9FAB;
- width: 20px;
- height: 20px;
-}
-
-.c5 {
- width: 100%;
- font-family: Muli,sans-serif;
- font-size: 16px;
- font-weight: 300;
- line-height: 1.63;
- text-align: center;
- color: #4b4c5c;
-}
-
-.c2 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-
-
-
-
-
-
-
-
-`;
diff --git a/src/features/rewards/grantWrapper/assets/gift.svg b/src/features/rewards/grantWrapper/assets/gift.svg
deleted file mode 100644
index 3c41abdd3..000000000
--- a/src/features/rewards/grantWrapper/assets/gift.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-
\ No newline at end of file
diff --git a/src/features/rewards/grantWrapper/assets/header.tsx b/src/features/rewards/grantWrapper/assets/header.tsx
deleted file mode 100644
index e36c4a0f0..000000000
--- a/src/features/rewards/grantWrapper/assets/header.tsx
+++ /dev/null
@@ -1,151 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this file,
-* You can obtain one at http://mozilla.org/MPL/2.0/.
-*/
-import * as React from 'react'
-
-export default (
-
-)
diff --git a/src/features/rewards/grantWrapper/index.tsx b/src/features/rewards/grantWrapper/index.tsx
deleted file mode 100644
index 78dcf7d6a..000000000
--- a/src/features/rewards/grantWrapper/index.tsx
+++ /dev/null
@@ -1,67 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import { StyledWrapper, StyledHeader, StyledTitle, StyledClose, StyledText, StyledGrantIcon, StyledPanelText, StyledHint } from './style'
-import { CloseCircleOIcon } from '../../../components/icons'
-import { getLocale } from '../../../helpers'
-
-import header from './assets/header'
-import giftIconUrl from './assets/gift.svg'
-
-export interface Props {
- id?: string
- testId?: string
- isPanel?: boolean
- onClose: () => void
- title: string
- fullScreen?: boolean
- hint?: string
- text: React.ReactNode
- children: React.ReactNode
-}
-
-export default class GrantWrapper extends React.PureComponent {
- render () {
- const { id, testId, isPanel, fullScreen, hint, onClose, title, text, children } = this.props
-
- return (
-
-
-
-
- {
- !isPanel
- ?
- {header}
-
- :
- }
-
- {title}
-
- {
- !isPanel || !hint
- ?
- {text}
-
- : null
- }
- {
- isPanel && hint
- ?
- {getLocale('captchaDrag')} {hint} {getLocale('captchaTarget')}
-
- : null
- }
- {children}
-
- )
- }
-}
diff --git a/src/features/rewards/grantWrapper/spec.tsx b/src/features/rewards/grantWrapper/spec.tsx
deleted file mode 100644
index f7deb5743..000000000
--- a/src/features/rewards/grantWrapper/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import GrantWrapper from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('Grant wrapper tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#wrapper').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/grantWrapper/style.ts b/src/features/rewards/grantWrapper/style.ts
deleted file mode 100644
index e1b992afe..000000000
--- a/src/features/rewards/grantWrapper/style.ts
+++ /dev/null
@@ -1,97 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-
-interface StyleProps {
- isPanel?: boolean
- fullScreen?: boolean
-}
-
-const getBackground = (props: StyleProps) => {
- if (props.fullScreen) {
- return '#fff'
- }
-
- if (props.isPanel) {
- return 'linear-gradient(-180deg, rgba(255, 255, 255, 1) 50%, rgba(228, 242, 255, 1) 100%)'
- }
-
- return 'rgba(255, 255, 255, 0.95)'
-}
-
-export const StyledWrapper = styled('div')`
- position: ${p => p.fullScreen ? 'fixed' : 'absolute'};
- top: 0;
- left: 0;
- z-index: 6;
- display: flex;
- align-items: stretch;
- align-content: flex-start;
- flex-wrap: wrap;
- overflow: hidden;
- width: 100%;
- padding: 0 52px 20px;
- border-radius: 6px;
- height: ${p => (p.fullScreen || p.isPanel) ? '100%' : 'auto'};
- overflow-y: ${p => p.fullScreen ? 'scroll' : 'hidden'};
- background: ${p => getBackground(p)};
-`
-
-export const StyledHeader = styled<{}, 'div'>('div')`
- text-align: center;
- width: 100%;
- margin: 59px 0;
-`
-
-export const StyledTitle = styled('div')`
- width: 100%;
- font-size: ${p => p.isPanel ? 20 : 28}px;
- font-weight: ${p => p.isPanel ? 'normal' : 500};
- line-height: 1.29;
- letter-spacing: -0.2px;
- text-align: center;
- color: #fb542b;
-`
-
-export const StyledClose = styled<{}, 'button'>('button')`
- top: 16px;
- right: 16px;
- position: absolute;
- padding: 0;
- border: none;
- background: none;
- cursor: pointer;
- color: #9E9FAB;
- width: 20px;
- height: 20px;
-`
-
-export const StyledText = styled<{}, 'div'>('div')`
- width: 100%;
- font-family: Muli, sans-serif;
- font-size: 16px;
- font-weight: 300;
- line-height: 1.63;
- text-align: center;
- color: #4b4c5c;
-`
-
-export const StyledGrantIcon = styled<{}, 'img'>('img')`
- height: 53px;
- width: 53px;
- margin: 25px auto 15px;
-`
-
-export const StyledPanelText = styled<{}, 'div'>('div')`
- padding: 7px;
- font-size: 12px;
- margin: 7px auto 0px;
- background: rgba(241, 241, 245, 0.70);
- border-radius: 8px 8px 8px 8px;
-`
-
-export const StyledHint = styled<{}, 'span'>('span')`
- font-weight: 600;
-`
diff --git a/src/features/rewards/hero/__snapshots__/spec.tsx.snap b/src/features/rewards/hero/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 2f9931f40..000000000
--- a/src/features/rewards/hero/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,25 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Hero tests basic tests matches the snapshot 1`] = `
-.c0 {
- text-align: center;
- min-height: 610px;
- padding: 60px 0 25px 0;
- border-top-left-radius: 35px;
- border-top-right-radius: 35px;
- background: linear-gradient(#392DD1,#8C41DE);
- border-bottom-left-radius: 150% 120px;
- border-bottom-right-radius: 150% 120px;
-}
-
-@media (max-width:475px) {
- .c0 {
- padding-top: 35px;
- }
-}
-
-
-`;
diff --git a/src/features/rewards/hero/index.tsx b/src/features/rewards/hero/index.tsx
deleted file mode 100644
index f1b5f29a6..000000000
--- a/src/features/rewards/hero/index.tsx
+++ /dev/null
@@ -1,27 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import { StyledHero } from './style'
-
-export interface Props {
- id?: string
- isMobile?: boolean
- children?: React.ReactNode
-}
-
-export default class Hero extends React.PureComponent {
- render () {
- const { id, isMobile, children } = this.props
-
- return (
-
- {children}
-
- )
- }
-}
diff --git a/src/features/rewards/hero/spec.tsx b/src/features/rewards/hero/spec.tsx
deleted file mode 100644
index a01c956a2..000000000
--- a/src/features/rewards/hero/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import Hero from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('Hero tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#test-hero').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/hero/style.ts b/src/features/rewards/hero/style.ts
deleted file mode 100644
index c0400d026..000000000
--- a/src/features/rewards/hero/style.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import styled from 'styled-components'
-
-interface StyleProps {
- isMobile?: boolean
-}
-
-export const StyledHero = styled('div')`
- text-align: center;
- min-height: 610px;
- padding: 60px 0 25px 0;
- border-top-left-radius: ${p => p.isMobile ? 0 : 35}px;
- border-top-right-radius: ${p => p.isMobile ? 0 : 35}px;
- background: linear-gradient(#392DD1, #8C41DE);
- border-bottom-left-radius: 150% 120px;
- border-bottom-right-radius: 150% 120px;
-
- @media (max-width: 475px) {
- padding-top: 35px;
- }
-`
diff --git a/src/features/rewards/index.ts b/src/features/rewards/index.ts
deleted file mode 100644
index 34e245377..000000000
--- a/src/features/rewards/index.ts
+++ /dev/null
@@ -1,123 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import AdRowsDetails from './adRowsDetails'
-import Alert from './alert'
-import Amount from './amount'
-import Box from './box'
-import BoxAlert from './boxAlert'
-import CategoryLikePicker from './categoryLikePicker'
-import DisabledBox from './disabledBox'
-import DisabledContent from './disabledContent'
-import DisabledPanel from './disabledPanel'
-import Donate from './donate'
-import DonationOverlay from './donationOverlay'
-import GrantCaptcha from './grantCaptcha'
-import GrantClaim from './grantClaim'
-import GrantComplete from './grantComplete'
-import GrantError from './grantError'
-import GrantWrapper from './grantWrapper'
-import InfoCard from './infoCard'
-import List from './list'
-import ListToken from './listToken'
-import MainToggle from './mainToggle'
-import MediaBox from './mediaBox'
-import ModalActivity from './modalActivity'
-import ModalAddFunds from './modalAddFunds'
-import ModalBackupRestore from './modalBackupRestore'
-import ModalContribute from './modalContribute'
-import ModalDonation from './modalDonation'
-import ModalPending from './modalPending'
-import ModalRedirect from './modalRedirect'
-import ModalShowAdsHistory from './modalShowAdsHistory'
-import ModalVerify from './modalVerify'
-import NextContribution from './nextContribution'
-import PanelWelcome from './panelWelcome'
-import Profile from './profile'
-import RestoreSites from './restoreSites'
-import RewardsButton from './rewardsButton'
-import SettingsPage from './settingsPage'
-import ShowAdsHistory from './showAdsHistory'
-import SiteBanner from './siteBanner'
-import Tab from './tab'
-import TableAdsHistory from './tableAdsHistory'
-import TableContribute from './tableContribute'
-import TableDonation from './tableDonation'
-import TablePending from './tablePending'
-import TableTransactions from './tableTransactions'
-import ThumbLikePicker from './thumbLikePicker'
-import Tip from './tip'
-import ToggleTips from './toggleTips'
-import Tokens from './tokens'
-import Tooltip from './tooltip'
-import WalletEmpty from './walletEmpty'
-import WalletOff from './walletOff'
-import WalletPanel from './walletPanel'
-import WalletPanelDisabled from './walletPanelDisabled'
-import WalletPopup from './walletPopup'
-import WalletSummary from './walletSummary'
-import WalletSummarySlider from './walletSummarySlider'
-import WalletWrapper from './walletWrapper'
-import WelcomePage from './welcomePage'
-
-export {
- AdRowsDetails,
- Alert,
- Amount,
- Box,
- BoxAlert,
- CategoryLikePicker,
- DisabledBox,
- DisabledContent,
- DisabledPanel,
- DonationOverlay,
- Donate,
- GrantCaptcha,
- GrantClaim,
- GrantComplete,
- GrantError,
- GrantWrapper,
- InfoCard,
- List,
- ListToken,
- MainToggle,
- MediaBox,
- ModalActivity,
- ModalAddFunds,
- ModalBackupRestore,
- ModalContribute,
- ModalDonation,
- ModalPending,
- ModalRedirect,
- ModalShowAdsHistory,
- ModalVerify,
- NextContribution,
- PanelWelcome,
- Profile,
- RestoreSites,
- RewardsButton,
- SettingsPage,
- ShowAdsHistory,
- SiteBanner,
- Tab,
- TableAdsHistory,
- TableContribute,
- TableDonation,
- TablePending,
- TableTransactions,
- ThumbLikePicker,
- Tip,
- ToggleTips,
- Tokens,
- Tooltip,
- WalletEmpty,
- WalletOff,
- WalletPanel,
- WalletPanelDisabled,
- WalletPopup,
- WalletSummary,
- WalletSummarySlider,
- WalletWrapper,
- WelcomePage
-}
diff --git a/src/features/rewards/infoCard/__snapshots__/spec.tsx.snap b/src/features/rewards/infoCard/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 9a318b680..000000000
--- a/src/features/rewards/infoCard/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,7 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Info Cards tests basic tests matches the snapshot 1`] = `
-
-`;
diff --git a/src/features/rewards/infoCard/index.tsx b/src/features/rewards/infoCard/index.tsx
deleted file mode 100644
index c04c0911a..000000000
--- a/src/features/rewards/infoCard/index.tsx
+++ /dev/null
@@ -1,58 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-
-import {
- StyledTitle,
- StyledDesc,
- StyledInfoCard,
- StyledFigure,
- StyledGrid,
- StyledColumn
-} from './style'
-
-export interface CardProps {
- title?: string
- description?: string
- icon?: string | JSX.Element
-}
-
-export interface Props {
- id?: string
- cards?: CardProps[]
-}
-
-export default class InfoCard extends React.PureComponent {
- getCards (items: CardProps[]) {
- return (
-
- {items.map((item: CardProps, index: number) => {
- return
-
-
- {item.icon}
-
- {item.title}
- {item.description}
-
-
- })}
-
- )
- }
-
- render () {
- const { id, cards } = this.props
- return (
-
- {
- cards
- ? this.getCards(cards)
- : null
- }
-
- )
- }
-}
diff --git a/src/features/rewards/infoCard/spec.tsx b/src/features/rewards/infoCard/spec.tsx
deleted file mode 100644
index 9dd494184..000000000
--- a/src/features/rewards/infoCard/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import InfoCards from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('Info Cards tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#info-cards').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/infoCard/style.ts b/src/features/rewards/infoCard/style.ts
deleted file mode 100644
index 537b0a71b..000000000
--- a/src/features/rewards/infoCard/style.ts
+++ /dev/null
@@ -1,58 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-
-export const StyledInfoCard = styled<{}, 'div'>('div')`
- height: 290px;
- border-radius: 4px;
- text-align: center;
- padding: 31px 15px 15px;
- background: #fff;
- max-width: 275px;
- margin: 0 auto;
- box-shadow: 0 2 4px rgba(0,0,0,.2);
-`
-
-export const StyledTitle = styled<{}, 'strong'>('strong')`
- color: #222326;
- font-size: 18px;
- font-weight: 500;
- line-height: 28px;
-`
-
-export const StyledDesc = styled<{}, 'p'>('p')`
- color: #686978;
- font-size: 16px;
- line-height: 22px;
- font-family: Muli, sans-serif;
- letter-spacing: 0.16px;
- margin: 10px 0 8px;
- font-weight: 400;
-`
-
-export const StyledFigure = styled<{}, 'figure'>('figure')`
- box-sizing: border-box;
- display: block;
- max-width: 100%;
- margin: 10px auto 20px;
- height: 80px;
-`
-
-export const StyledGrid = styled<{}, 'div'>('div')`
- display: grid;
- grid-gap: 0px;
- grid-template-columns: 1fr 1fr 1fr;
- align-items: center;
- justify-content: center;
-
- @media (max-width: 640px) {
- grid-gap: 20px;
- grid-template-columns: 1fr;
- }
-`
-
-export const StyledColumn = styled<{}, 'div'>('div')`
- padding: 0 10px;
-`
diff --git a/src/features/rewards/list/__snapshots__/spec.tsx.snap b/src/features/rewards/list/__snapshots__/spec.tsx.snap
deleted file mode 100644
index d9342bb80..000000000
--- a/src/features/rewards/list/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,47 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`List tests basic tests matches the snapshot 1`] = `
-.c0 {
- position: relative;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- border-bottom: solid 1px #E5E5EA;
- -webkit-box-pack: justify;
- -webkit-justify-content: space-between;
- -ms-flex-pack: justify;
- justify-content: space-between;
- font-family: Muli,sans-serif;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
-}
-
-.c1 {
- font-size: 16px;
- color: #4b4c5c;
- padding: 16px 0;
- font-weight: 600;
-}
-
-.c2 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
-}
-
-
-`;
diff --git a/src/features/rewards/list/index.tsx b/src/features/rewards/list/index.tsx
deleted file mode 100644
index 96d1031c2..000000000
--- a/src/features/rewards/list/index.tsx
+++ /dev/null
@@ -1,27 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import { StyledWrapper, StyledTitle, StyledContentWrapper } from './style'
-
-export interface Props {
- id?: string
- title?: string | React.ReactNode
- children?: React.ReactNode
-}
-
-export default class List extends React.PureComponent {
- render () {
- const { id, title, children } = this.props
-
- return (
-
- {title}
-
- {children}
-
-
- )
- }
-}
diff --git a/src/features/rewards/list/spec.tsx b/src/features/rewards/list/spec.tsx
deleted file mode 100644
index fa67d8d23..000000000
--- a/src/features/rewards/list/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import List from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('List tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#list').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/list/style.ts b/src/features/rewards/list/style.ts
deleted file mode 100644
index 1ba348eba..000000000
--- a/src/features/rewards/list/style.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from '../../../theme'
-
-export const StyledWrapper = styled<{}, 'div'>('div')`
- position: relative;
- display: flex;
- border-bottom: solid 1px #E5E5EA;
- justify-content: space-between;
- font-family: ${p => p.theme.fontFamily.body};
- align-items: center;
-`
-
-export const StyledTitle = styled<{}, 'div'>('div')`
- font-size: 16px;
- color: #4b4c5c;
- padding: 16px 0;
- font-weight: 600;
-`
-
-export const StyledContentWrapper = styled<{}, 'div'>('div')`
-display: flex;
-`
diff --git a/src/features/rewards/listToken/__snapshots__/spec.tsx.snap b/src/features/rewards/listToken/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 933a9afeb..000000000
--- a/src/features/rewards/listToken/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,122 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`ListToken tests basic tests matches the snapshot 1`] = `
-.c0 {
- position: relative;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- border-bottom: 1px solid #d0d6dc;
- border-top: none;
- -webkit-box-pack: justify;
- -webkit-justify-content: space-between;
- -ms-flex-pack: justify;
- justify-content: space-between;
- -webkit-align-items: baseline;
- -webkit-box-align: baseline;
- -ms-flex-align: baseline;
- align-items: baseline;
- -webkit-align-content: flex-start;
- -ms-flex-line-pack: start;
- align-content: flex-start;
- -webkit-flex-wrap: nowrap;
- -ms-flex-wrap: nowrap;
- flex-wrap: nowrap;
- font-family: Muli,sans-serif;
-}
-
-.c1 {
- font-size: 14px;
- line-height: 2.79;
- color: #4b4c5c;
- -webkit-box-flex: 1;
- -webkit-flex-grow: 1;
- -ms-flex-positive: 1;
- flex-grow: 1;
- -webkit-flex-shrink: 1;
- -ms-flex-negative: 1;
- flex-shrink: 1;
- -webkit-flex-basis: 60%;
- -ms-flex-preferred-size: 60%;
- flex-basis: 60%;
-}
-
-.c2 {
- -webkit-box-flex: 1;
- -webkit-flex-grow: 1;
- -ms-flex-positive: 1;
- flex-grow: 1;
- -webkit-flex-shrink: 1;
- -ms-flex-negative: 1;
- flex-shrink: 1;
- -webkit-flex-basis: 40%;
- -ms-flex-preferred-size: 40%;
- flex-basis: 40%;
- text-align: right;
-}
-
-.c3 {
- --tokens-value-color: #4b4c5c;
- --tokens-text-size: 14px;
- --tokens-token-size: 14px;
- --tokens-tokenNum-size: 14px;
-}
-
-.c4 {
- display: inline-block;
-}
-
-.c5 {
- color: var(--tokens-value-color);
- font-size: var(--tokens-tokenNum-size);
-}
-
-.c6 {
- font-size: var(--tokens-token-size);
- display: inline-block;
- margin-left: 4px;
-}
-
-@media (max-width:385px) {
- .c2 {
- -webkit-flex-basis: 55%;
- -ms-flex-preferred-size: 55%;
- flex-basis: 55%;
- }
-}
-
-
-
-
-
-
-
-
- 10
-
-
- BAT
-
-
-
-
-
-`;
diff --git a/src/features/rewards/listToken/index.tsx b/src/features/rewards/listToken/index.tsx
deleted file mode 100644
index 039323fb1..000000000
--- a/src/features/rewards/listToken/index.tsx
+++ /dev/null
@@ -1,44 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import { StyledWrapper, StyledTitle, StyledContentWrapper } from './style'
-import Tokens, { Size, Type } from '../tokens/index'
-
-export interface Props {
- title: React.ReactNode
- value: string
- converted: string
- id?: string
- isNegative?: boolean
- size?: Size
- color?: Type
- border?: 'first' | 'last' | 'default'
- testId?: string
-}
-
-export default class ListToken extends React.PureComponent {
- static defaultProps = {
- border: 'default'
- }
-
- render () {
- const { id, title, value, converted, isNegative, size, color, border, testId } = this.props
-
- return (
-
- {title}
-
-
-
-
- )
- }
-}
diff --git a/src/features/rewards/listToken/spec.tsx b/src/features/rewards/listToken/spec.tsx
deleted file mode 100644
index 97ff95977..000000000
--- a/src/features/rewards/listToken/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import ListToken from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('ListToken tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#list').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/listToken/style.ts b/src/features/rewards/listToken/style.ts
deleted file mode 100644
index 3ef53157c..000000000
--- a/src/features/rewards/listToken/style.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from '../../../theme'
-import { Props } from './index'
-
-export const StyledWrapper = styled, 'div'>('div')`
- position: relative;
- display: flex;
- border-bottom: ${p => p.border === 'last' ? 'none' : '1px solid #d0d6dc'};
- border-top: ${p => p.border === 'first' ? '1px solid #d0d6dc' : 'none'};
- justify-content: space-between;
- align-items: baseline;
- align-content: flex-start;
- flex-wrap: nowrap;
- font-family: ${p => p.theme.fontFamily.body};
-`
-
-export const StyledTitle = styled<{}, 'div'>('div')`
- font-size: 14px;
- line-height: 2.79;
- color: #4b4c5c;
- flex-grow: 1;
- flex-shrink: 1;
- flex-basis: 60%;
-`
-
-export const StyledContentWrapper = styled<{}, 'div'>('div')`
- flex-grow: 1;
- flex-shrink: 1;
- flex-basis: 40%;
- text-align: right;
-
- @media (max-width: 385px) {
- flex-basis: 55%;
- }
-`
diff --git a/src/features/rewards/mainToggle/__snapshots__/spec.tsx.snap b/src/features/rewards/mainToggle/__snapshots__/spec.tsx.snap
deleted file mode 100644
index efcfc3e39..000000000
--- a/src/features/rewards/mainToggle/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,245 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`MainToggle tests basic tests matches the snapshot 1`] = `
-.c0 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- border-radius: 4px;
- background-color: #FFF;
- -webkit-box-pack: justify;
- -webkit-justify-content: space-between;
- -ms-flex-pack: justify;
- justify-content: space-between;
- padding: 20px 32px;
- margin-bottom: 24px;
- width: 100%;
- box-shadow: 0 2px 4px rgba(0,0,0,.2);
- -webkit-flex-direction: column;
- -ms-flex-direction: column;
- flex-direction: column;
-}
-
-.c1 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- width: 100%;
- -webkit-box-pack: justify;
- -webkit-justify-content: space-between;
- -ms-flex-pack: justify;
- justify-content: space-between;
-}
-
-.c5 {
- font-size: 28px;
- font-weight: 600;
- font-family: Poppins,sans-serif;
-}
-
-.c2 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
-}
-
-.c11 {
- display: block;
- margin-top: 20px;
- font-family: Muli,sans-serif;
-}
-
-.c12 {
- color: #3b3e4f;
- font-size: 14px;
- font-weight: normal;
- -webkit-letter-spacing: 0;
- -moz-letter-spacing: 0;
- -ms-letter-spacing: 0;
- letter-spacing: 0;
- line-height: 18px;
-}
-
-.c13 {
- cursor: pointer;
- color: #4C54D2;
- font-weight: 600;
-}
-
-.c3 {
- width: 48px;
- height: 48px;
- margin: 8px;
-}
-
-.c6 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
-}
-
-.c8 {
- position: relative;
- display: block;
- height: 24px;
- width: 40px;
-}
-
-.c9 {
- background: #A7ACB2;
- height: 8px;
- margin-top: 8px;
- width: 100%;
- border-radius: 3px;
-}
-
-.c10 {
- position: relative;
- border-radius: 50%;
- -webkit-transition: all .4s ease;
- transition: all .4s ease;
- --toggle-bullet-size: 20px;
- --toggle-bullet-transform: translate(-1px,calc(-50% - 4px));
- --toggle-bullet-background: #CDD1D5;
- width: var(--toggle-bullet-size);
- height: var(--toggle-bullet-size);
- -webkit-transform: var(--toggle-bullet-transform);
- -ms-transform: var(--toggle-bullet-transform);
- transform: var(--toggle-bullet-transform);
- background-color: var(--toggle-bullet-background);
- box-shadow: 0 3px 3px rgba(0,0,0,0.05);
-}
-
-.c7 {
- color: #838391;
- font-size: 14px;
- font-family: Muli,sans-serif;
- text-align: right;
- -webkit-letter-spacing: 0.4px;
- -moz-letter-spacing: 0.4px;
- -ms-letter-spacing: 0.4px;
- letter-spacing: 0.4px;
- text-transform: uppercase;
- margin: 4px 8px 0 0;
- opacity: 1;
- -webkit-transition: 100ms ease-out;
- transition: 100ms ease-out;
-}
-
-.c4 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-
-
-
-
-
- MISSING: braveRewards
-
-
-
-
-
-
-`;
diff --git a/src/features/rewards/mainToggle/index.tsx b/src/features/rewards/mainToggle/index.tsx
deleted file mode 100644
index 93ce71487..000000000
--- a/src/features/rewards/mainToggle/index.tsx
+++ /dev/null
@@ -1,65 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- MainToggleWrapper,
- StyledTitle,
- ToggleHeading,
- StyledTOSWrapper,
- StyledServiceText,
- StyledServiceLink,
- StyledLogotypeWrapper,
- StyledLogoWrapper
-} from './style'
-import Toggle from '../../../components/formControls/toggle/index'
-import { getLocale } from '../../../helpers'
-import { BatColorIcon } from '../../../components/icons'
-
-export interface Props {
- enabled: boolean
- onToggle: () => void
- id?: string
- testId?: string
- onTOSClick?: () => void
- onPrivacyClick?: () => void
-}
-
-export default class MainToggle extends React.PureComponent {
- render () {
- const {
- id,
- enabled,
- onToggle,
- testId,
- onTOSClick,
- onPrivacyClick
- } = this.props
-
- return (
-
-
-
-
-
-
-
- {getLocale('braveRewards')}
-
-
-
-
- {
- !enabled
- ?
-
- {getLocale('serviceTextToggle')} {getLocale('termsOfService')} {getLocale('and')} {getLocale('privacyPolicy')}.
-
-
- : null
- }
-
- )
- }
-}
diff --git a/src/features/rewards/mainToggle/spec.tsx b/src/features/rewards/mainToggle/spec.tsx
deleted file mode 100644
index f038aabd2..000000000
--- a/src/features/rewards/mainToggle/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import MainToggle from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('MainToggle tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#mainToggle').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/mainToggle/style.ts b/src/features/rewards/mainToggle/style.ts
deleted file mode 100644
index f6cbc4115..000000000
--- a/src/features/rewards/mainToggle/style.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from '../../../theme'
-
-export const MainToggleWrapper = styled<{}, 'div'>('div')`
- display: flex;
- border-radius: 4px;
- background-color: #FFF;
- justify-content: space-between;
- padding: 20px 32px;
- margin-bottom: 24px;
- width: 100%;
- box-shadow: 0 2px 4px rgba(0, 0, 0, .2);
- flex-direction: column;
-`
-
-export const ToggleHeading = styled<{}, 'div'>('div')`
- display: flex;
- align-items: center;
- width: 100%;
- justify-content: space-between;
-`
-
-export const StyledTitle = styled<{}, 'div'>('div')`
- font-size: 28px;
- font-weight: 600;
- font-family: ${p => p.theme.fontFamily.heading};
-`
-
-export const StyledLogotypeWrapper = styled('div')`
- display: flex;
- align-items: center;
-`
-
-export const StyledTOSWrapper = styled<{}, 'div'>('div')`
- display: block;
- margin-top: 20px;
- font-family: Muli, sans-serif;
-`
-
-export const StyledServiceText = styled<{}, 'span'>('span')`
- color: ${p => p.theme.palette.grey800};
- font-size: 14px;
- font-weight: normal;
- letter-spacing: 0;
- line-height: 18px;
-`
-
-export const StyledServiceLink = styled<{}, 'a'>('a')`
- cursor: pointer;
- color: ${p => p.theme.palette.blurple500};
- font-weight: 600;
-`
-
-export const StyledLogoWrapper = styled<{}, 'div'>('div')`
-width: 48px;
-height: 48px;
-margin: 8px;
-`
diff --git a/src/features/rewards/mediaBox/index.tsx b/src/features/rewards/mediaBox/index.tsx
deleted file mode 100644
index fa8cba3b8..000000000
--- a/src/features/rewards/mediaBox/index.tsx
+++ /dev/null
@@ -1,66 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledMediaBox,
- StyledMediaText,
- StyledMediaTimestamp,
- StyledMediaIcon
-} from './style'
-
-import {
- TwitterColorIcon,
- RedditColorIcon
-} from '../../../components/icons'
-
-export interface Props {
- mediaType: 'twitter' | 'reddit'
- mediaText: string
- mediaTimestamp: number
- mediaTimetext?: string
-}
-
-export default class MediaBox extends React.Component {
- formatTimestamp = (timestamp: Date) => {
- const dateOptions = { month: 'short', day: 'numeric' }
- if (new Date().getFullYear() !== timestamp.getFullYear()) {
- (dateOptions as any)['year'] = 'numeric'
- }
- return timestamp.toLocaleString(navigator.language, dateOptions)
- }
-
- getMediaIcon = () => {
- return this.props.mediaType === 'twitter'
- ?
- : this.props.mediaType === 'reddit'
- ?
- : null
- }
-
- getMediaTimestamp = () => {
- const { mediaType, mediaTimestamp, mediaTimetext } = this.props
- return mediaType === 'twitter'
- ? this.formatTimestamp(new Date(mediaTimestamp * 1000))
- : mediaType === 'reddit'
- ? mediaTimetext
- : null
- }
-
- render () {
- return (
-
-
- {this.getMediaIcon()}
-
-
- {this.getMediaTimestamp()}
-
-
- {this.props.mediaText}
-
-
- )
- }
-}
diff --git a/src/features/rewards/mediaBox/style.ts b/src/features/rewards/mediaBox/style.ts
deleted file mode 100644
index 748bd5a43..000000000
--- a/src/features/rewards/mediaBox/style.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import palette from '../../../theme/colors'
-import styled from 'styled-components'
-
-export const StyledMediaBox = styled<{}, 'div'>('div')`
- border: 1px solid ${palette.grey400};
- border-radius: 5px;
- margin: 15px 0 0 0;
- padding: 15px;
- text-overflow: ellipsis;
- white-space: pre-wrap;
- overflow: hidden;
-`
-
-export const StyledMediaTimestamp = styled<{}, 'div'>('div')`
- color: ${palette.grey500};
- font-size: 12px;
- display: inline;
- vertical-align: middle;
-`
-
-export const StyledMediaText = styled<{}, 'p'>('p')`
- font-size: 14px;
-`
-
-export const StyledMediaIcon = styled<{}, 'span'>('span')`
- width: 22px;
- height: 22px;
- margin-right: 5px;
- display: inline-block;
- vertical-align: middle;
-`
diff --git a/src/features/rewards/mobile/boxMobile/__snapshots__/spec.tsx.snap b/src/features/rewards/mobile/boxMobile/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 315aed857..000000000
--- a/src/features/rewards/mobile/boxMobile/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,145 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Box tests basic tests matches the snapshot 1`] = `
-.c1 {
- max-width: 100%;
- width: 100%;
- min-height: auto;
- margin: 0;
- background-color: #fff;
- border-radius: 4px;
- box-shadow: 0 2px 4px rgba(0,0,0,.15);
- font-size: inherit;
- font-family: Muli,sans-serif;
- box-sizing: border-box;
- position: relative;
-}
-
-.c0 {
- margin-bottom: 12px;
-}
-
-.c2 {
- display: block;
-}
-
-.c3 {
- -webkit-flex-direction: column;
- -ms-flex-direction: column;
- flex-direction: column;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
-}
-
-.c5 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- padding: 0 0 0 24px;
-}
-
-.c7 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- padding: 0 24px 0 0;
-}
-
-.c6 {
- font-family: Poppins,sans-serif;
- font-size: 18px;
- font-weight: 600;
- color: #4b4c5c;
-}
-
-.c8 {
- width: 100%;
- display: block;
-}
-
-.c10 {
- width: 100%;
- font-size: 14px;
- line-height: 1.7;
- padding: 16px 0;
- color: #5e6175;
-}
-
-.c9 {
- width: 100%;
- padding: 0px 24px;
- display: block;
-}
-
-.c4 {
- width: 100%;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- z-index: 1;
- -webkit-box-pack: justify;
- -webkit-justify-content: space-between;
- -ms-flex-pack: justify;
- justify-content: space-between;
- padding: 16px 0;
- border-bottom: 1px solid #E5E5EA;
-}
-
-
-`;
diff --git a/src/features/rewards/mobile/boxMobile/index.tsx b/src/features/rewards/mobile/boxMobile/index.tsx
deleted file mode 100644
index 9a64890fc..000000000
--- a/src/features/rewards/mobile/boxMobile/index.tsx
+++ /dev/null
@@ -1,334 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledCard,
- StyledLeft,
- StyledRight,
- StyledDescription,
- StyledContent,
- StyledTitle,
- StyledBreak,
- StyledContentWrapper,
- StyledFlip,
- StyleDetailsLink,
- StyledDetailContent,
- StyledSettingsListTitle,
- StyledArrow,
- StyledToggleHeader,
- StyledBackArrow,
- StyledFullSizeWrapper,
- StyledDetailInfo,
- StyledSettingsContent,
- StyledSettingsHeader,
- StyledSettingsTitle,
- StyledSettingsClose,
- StyledChildContent,
- StyledSettingsIcon,
- StyledSettingsText,
- StyledToggleWrapper,
- StyledMobileListWrapper
-} from './style'
-import {
- ArrowLeftIcon,
- CaratRightIcon,
- CloseStrokeIcon,
- SettingsIcon
-} from '../../../../components/icons'
-import { List } from '../../'
-import { getLocale } from '../../../../helpers'
-import Toggle from '../../../../components/formControls/toggle/index'
-
-export type Type = 'ads' | 'contribute' | 'donation'
-
-export interface Props {
- type: Type
- id?: string
- title: string
- description?: string
- settingsChild?: React.ReactNode
- children?: React.ReactNode
- toggle?: boolean
- checked?: boolean
- toggleAction?: () => void
-}
-
-interface State {
- detailView: boolean
- settings: boolean
-}
-
-export default class BoxMobile extends React.PureComponent {
- constructor (props: Props) {
- super(props)
- this.state = {
- detailView: false,
- settings: false
- }
- }
-
- componentDidMount () {
- this.handleUrl()
- window.addEventListener('popstate', (e) => {
- this.handleUrl()
- })
- }
-
- handleUrl = () => {
- const path = window.location.pathname
- // Index view, no need to do anything here
- if (path === '/') {
- this.setState({
- detailView: false,
- settings: false
- })
- return
- }
-
- const { type } = this.props
- const typeString = `/${type}`
- const settingsString = `/${type}-settings`
-
- if (path === typeString) {
- this.setView('detailView', false)
- } else if (path === settingsString) {
- this.setView('settings', false)
- }
- }
-
- /*
- * Sets state given the view that should be shown.
- *
- * When user is on the index page: (brave://rewards)
- * (state) { detailView: false, settings: false }
- *
- * When user is on a detail view: (brave://rewards/ads)
- * (state) { detailView: true, settings: false }
- *
- * When user is on a settings view: (brave://rewards/ads-settings)
- * (state) { detailView: true, settings: true }
- */
- setView = (view: string, updateHistory: boolean = true) => {
- let isDetailView
- let isSettingsView
-
- switch (view) {
- case 'detailView':
- isDetailView = true
- isSettingsView = false
- break
- case 'settings':
- isDetailView = true
- isSettingsView = true
- break
- default:
- isDetailView = false
- isSettingsView = false
- break
- }
-
- this.setState({
- detailView: isDetailView,
- settings: isSettingsView
- })
-
- if (updateHistory) {
- let newPath = ''
- const { type } = this.props
-
- if (!isSettingsView && !isDetailView) {
- newPath = '/'
- } else if (isSettingsView) {
- newPath = `/${type}-settings`
- } else if (isDetailView) {
- newPath = `/${type}`
- }
-
- window.history.pushState(null, '', newPath)
- }
- }
-
- onToggle = () => {
- if (this.props.checked) {
- this.setState({
- detailView: false,
- settings: false
- })
- }
-
- if (this.props.toggleAction) {
- this.props.toggleAction()
- }
- }
-
- getSettingsTitle = (title: string) => {
- return `${title} ${getLocale('settings')}`
- }
-
- getToggleHeader = (props: Props) => {
- const {
- title,
- type,
- checked,
- toggle
- } = props
- const isDetailView = checked && this.state.detailView
-
- return (
-
-
- {
- isDetailView
- ?
-
-
- : null
- }
-
- {title}
-
-
-
- {
- toggle ?
-
-
-
- : null
- }
-
-
- )
- }
-
- getBoxContent = () => {
- const { checked } = this.props
-
- if (!checked || this.state.detailView) {
- return null
- }
-
- return (
-
-
- {getLocale('viewDetails')}
-
-
-
-
-
- )
- }
-
- getSettingsListTitle = () => {
- return (
-
-
-
- {getLocale('settings')}
-
-
-
-
-
-
- )
- }
-
- getSettingsContent = (show?: boolean) => {
- const { title, settingsChild } = this.props
-
- if (!show || !settingsChild) {
- return null
- }
-
- return (
-
-
-
-
-
-
- {this.getSettingsTitle(title)}
-
-
-
-
-
-
- {settingsChild}
-
-
- )
- }
-
- getDetailContent = (show?: boolean) => {
- const { children, settingsChild } = this.props
-
- if (!show) {
- return null
- }
-
- return (
-
- {this.getToggleHeader(this.props)}
-
-
-
- {this.props.description}
-
-
-
- {
- settingsChild
- ?
- : null
- }
- {children}
-
-
-
- )
- }
-
- render () {
- const {
- id,
- description,
- checked
- } = this.props
-
- const showDetailView = checked && this.state.detailView
- const showSettingsView = checked && this.state.settings
-
- return (
-
-
-
- {this.getToggleHeader(this.props)}
-
-
-
- {description}
-
-
- {this.getBoxContent()}
-
-
- {this.getDetailContent(showDetailView)}
- {this.getSettingsContent(showSettingsView)}
-
- )
- }
-}
diff --git a/src/features/rewards/mobile/boxMobile/spec.tsx b/src/features/rewards/mobile/boxMobile/spec.tsx
deleted file mode 100644
index 2a3fcefd6..000000000
--- a/src/features/rewards/mobile/boxMobile/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import BoxMobile from './index'
-import { TestThemeProvider } from '../../../../theme'
-
-describe('Box tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#box').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/mobile/boxMobile/style.tsx b/src/features/rewards/mobile/boxMobile/style.tsx
deleted file mode 100644
index d94da5635..000000000
--- a/src/features/rewards/mobile/boxMobile/style.tsx
+++ /dev/null
@@ -1,234 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import styled, { css } from '../../../../theme'
-import { Type } from './index'
-import Card, { CardProps } from '../../../../components/layout/card'
-
-interface StyleProps {
- open?: boolean
- float?: string
- type?: Type
- enabled?: boolean
- detailView?: boolean
- contentShown?: boolean
-}
-
-const colors: Record = {
- ads: '#C12D7C',
- contribute: '#9F22A1',
- donation: '#696FDC'
-}
-
-const getFixedStyling = (detailView?: boolean) => {
- if (!detailView) {
- return null
- }
-
- return css`
- top: 0px;
- left: 0px;
- position: fixed;
- background: #fff;
- `
-}
-
-const CustomCard: React.FC = (props) =>
-
-
-export const StyledCard = styled(CustomCard)`
- margin-bottom: 12px;
-`
-
-export const StyledFlip = styled<{}, 'div'>('div')`
- display: block;
-`
-
-export const StyledContentWrapper = styled('div')`
- flex-direction: column;
- display: ${p => p.open ? 'flex' : 'none'};
-`
-
-export const StyledLeft = styled<{}, 'div'>('div')`
- display: flex;
- align-items: center;
- padding: 0 0 0 24px;
-`
-
-export const StyledRight = styled<{}, 'div'>('div')`
- display: flex;
- padding: 0 24px 0 0;
-`
-
-export const StyledTitle = styled('div')`
- font-family: ${p => p.theme.fontFamily.heading};
- font-size: 18px;
- font-weight: 600;
- color: ${p => {
- if (p.enabled === false) return '#838391'
- return p.type && colors[p.type] || '#4b4c5c'
- }};
-`
-
-export const StyledBreak = styled<{}, 'div'>('div')`
- width: 100%;
- display: block;
-`
-
-export const StyledDescription = styled('div')`
- width: 100%;
- font-size: 14px;
- line-height: 1.7;
- padding: 16px 0;
- color: ${p => p.theme.color.text};
-`
-
-export const StyledContent = styled('div')`
- flex-basis: 100%;
- flex-grow: 1;
- text-align: ${p => p.contentShown ? 'default' : 'center'};
-`
-
-export const StyledSettingsWrapper = styled('div')`
- background: #fff;
- overflow: hidden;
- display: ${p => p.open ? 'block' : 'none'};
-`
-
-export const StyledSettingsClose = styled<{}, 'button'>('button')`
- display: block;
- position: absolute;
- right: 16px;
- top: 16px;
- width: 20px;
- height: 20px;
- border: none;
- background: none;
- padding: 0;
- cursor: pointer;
- color: ${p => p.theme.palette.grey600};
-`
-
-export const StyledSettingsTitle = styled<{}, 'span'>('span')`
- color: #4B4C5C;
- font-size: 16px;
- font-weight: 600;
- width: 100%;
- text-align: center;
-`
-
-export const StyledSettingsText = styled<{}, 'div'>('div')`
- color: #4B4C5C;
- font-size: 16px;
- font-weight: 600;
- display: flex;
- align-items: center;
-`
-
-export const StyleDetailsLink = styled<{}, 'a'>('a')`
- color: #4C54D2;
- font-size: 14px;
- display: flex;
- align-items: center;
- justify-content: center;
- padding: 16px;
- font-weight: 600;
-`
-
-export const StyledDetailInfo = styled<{}, 'div'>('div')`
- width: 100%;
- padding: 0px 24px;
- display: block;
-`
-
-export const StyledDetailContent = styled<{}, 'div'>('div')`
- display: flex;
- flex-direction: column;
-`
-
-export const StyledChildContent = styled<{}, 'div'>('div')`
- width: 100%;
- display: flex;
- flex-direction: column;
- border-top: 1px solid #E5E5EA;
-`
-
-export const StyledSettingsContent = styled<{}, 'div'>('div')`
- width: 100%;
- padding: 24px;
- display: flex;
- flex-direction: column;
-`
-
-export const StyledSettingsHeader = styled<{}, 'div'>('div')`
- width: 100%;
- display: flex;
- padding: 0 24px;
-`
-
-export const StyledSettingsListTitle = styled<{}, 'span'>('span')`
- font-size: 16px;
- width: 100%;
- display: flex;
- justify-content: space-between;
-`
-
-export const StyledArrow = styled<{}, 'span'>('span')`
- color: #4C54D2;
- height: 16px;
- width: 16px;
- margin: 4px;
-`
-
-export const StyledToggleHeader = styled('div')`
- width: 100%;
- display: flex;
- align-items: center;
- ${p => getFixedStyling(p.detailView)}
- z-index: 1;
- justify-content: space-between;
- padding: 16px 0;
- border-bottom: 1px solid #E5E5EA;
-`
-
-export const StyledBackArrow = styled<{}, 'span'>('span')`
- height: 24px;
- width: 24px;
- margin: 0 8px 0 0;
-`
-
-export const StyledFullSizeWrapper = styled<{}, 'div'>('div')`
- display: block;
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background: #fff;
- z-index: 999;
- overflow-y: scroll;
- padding: 64px 0 0;
-`
-
-export const StyledSettingsIcon = styled<{}, 'button'>('button')`
- width: 24px;
- height: 24px;
- border: none;
- background: none;
- padding: 0;
- cursor: pointer;
- color: #A1A8F2;
- position: absolute;
- right: 24px;
- top: 16px;
-`
-
-export const StyledToggleWrapper = styled('div')`
- display: flex;
-`
-
-export const StyledMobileListWrapper = styled<{}, 'div'>('div')`
- padding: 0 24px;
-`
diff --git a/src/features/rewards/mobile/index.ts b/src/features/rewards/mobile/index.ts
deleted file mode 100644
index 34bc0c5ee..000000000
--- a/src/features/rewards/mobile/index.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import BoxMobile from './boxMobile'
-import MainToggleMobile from './mainToggleMobile'
-import SelectMobile from './selectMobile'
-import SettingsPageMobile from './settingsPageMobile'
-import WalletInfoHeader from './walletInfoHeader'
-
-export {
- BoxMobile,
- MainToggleMobile,
- SelectMobile,
- SettingsPageMobile,
- WalletInfoHeader
-}
diff --git a/src/features/rewards/mobile/mainToggleMobile/__snapshots__/spec.tsx.snap b/src/features/rewards/mobile/mainToggleMobile/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 4ea4e6e67..000000000
--- a/src/features/rewards/mobile/mainToggleMobile/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,201 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`MainToggleMobile tests basic tests matches the snapshot 1`] = `
-.c0 {
- font-family: Muli,sans-serif;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- width: 100%;
- background-color: #fff;
- -webkit-box-pack: justify;
- -webkit-justify-content: space-between;
- -ms-flex-pack: justify;
- justify-content: space-between;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- position: fixed;
- top: 0;
- left: 0;
- height: 61px;
- z-index: 2;
- box-shadow: 0 2px 4px rgba(0,0,0,0.2);
- padding: 0 16px;
-}
-
-.c1 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
-}
-
-.c5 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
-}
-
-.c4 {
- color: #4B4C5C;
- font-size: 22px;
- font-weight: 600;
- font-family: Poppins,sans-serif;
-}
-
-.c2 {
- width: 24px;
- height: 24px;
- margin: 8px;
-}
-
-.c6 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
-}
-
-.c8 {
- position: relative;
- display: block;
- height: 24px;
- width: 40px;
-}
-
-.c9 {
- background: #A7ACB2;
- height: 8px;
- margin-top: 8px;
- width: 100%;
- border-radius: 3px;
-}
-
-.c10 {
- position: relative;
- border-radius: 50%;
- -webkit-transition: all .4s ease;
- transition: all .4s ease;
- --toggle-bullet-size: 20px;
- --toggle-bullet-transform: translate(-1px,calc(-50% - 4px));
- --toggle-bullet-background: #CDD1D5;
- width: var(--toggle-bullet-size);
- height: var(--toggle-bullet-size);
- -webkit-transform: var(--toggle-bullet-transform);
- -ms-transform: var(--toggle-bullet-transform);
- transform: var(--toggle-bullet-transform);
- background-color: var(--toggle-bullet-background);
- box-shadow: 0 3px 3px rgba(0,0,0,0.05);
-}
-
-.c7 {
- color: #838391;
- font-size: 14px;
- font-family: Muli,sans-serif;
- text-align: right;
- -webkit-letter-spacing: 0.4px;
- -moz-letter-spacing: 0.4px;
- -ms-letter-spacing: 0.4px;
- letter-spacing: 0.4px;
- text-transform: uppercase;
- margin: 4px 8px 0 0;
- opacity: 1;
- -webkit-transition: 100ms ease-out;
- transition: 100ms ease-out;
-}
-
-.c3 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-@media (max-width:375px) {
- .c4 {
- word-wrap: break-word;
- }
-}
-
-
-
-
-
- MISSING: braveRewards
-
-
-
-
-`;
diff --git a/src/features/rewards/mobile/mainToggleMobile/index.tsx b/src/features/rewards/mobile/mainToggleMobile/index.tsx
deleted file mode 100644
index 68cd17102..000000000
--- a/src/features/rewards/mobile/mainToggleMobile/index.tsx
+++ /dev/null
@@ -1,44 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledWrapper,
- StyledTitle,
- StyledLeft,
- StyledRight,
- StyledLogoWrapper
-} from './style'
-import Toggle from '../../../../components/formControls/toggle/index'
-import { getLocale } from '../../../../helpers'
-import { BatColorIcon } from '../../../../components/icons'
-
-export interface Props {
- enabled: boolean
- onToggle: () => void
- id?: string
- testId?: string
-}
-
-export default class MainToggleMobile extends React.PureComponent {
- render () {
- const { id, enabled, onToggle, testId } = this.props
-
- return (
-
-
-
-
-
-
- {getLocale('braveRewards')}
-
-
-
-
-
-
- )
- }
-}
diff --git a/src/features/rewards/mobile/mainToggleMobile/spec.tsx b/src/features/rewards/mobile/mainToggleMobile/spec.tsx
deleted file mode 100644
index 261c91882..000000000
--- a/src/features/rewards/mobile/mainToggleMobile/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import MainToggleMobile from './index'
-import { TestThemeProvider } from '../../../../theme'
-
-describe('MainToggleMobile tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#mainToggleMobile').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/mobile/mainToggleMobile/style.ts b/src/features/rewards/mobile/mainToggleMobile/style.ts
deleted file mode 100644
index f6c381610..000000000
--- a/src/features/rewards/mobile/mainToggleMobile/style.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from '../../../../theme'
-
-export const StyledWrapper = styled<{}, 'div'>('div')`
- font-family: ${p => p.theme.fontFamily.body};
- display: flex;
- width: 100%;
- background-color: #fff;
- justify-content: space-between;
- align-items: center;
- position: fixed;
- top: 0;
- left: 0;
- height: 61px;
- z-index: 2;
- box-shadow: 0 2px 4px rgba(0,0,0, 0.2);
- padding: 0 16px;
-`
-
-export const StyledLeft = styled<{}, 'div'>('div')`
- display: flex;
- align-items: center;
-`
-
-export const StyledRight = styled<{}, 'div'>('div')`
- display: flex;
-`
-
-export const StyledTitle = styled<{}, 'div'>('div')`
- color: #4B4C5C;
- font-size: 22px;
- font-weight: 600;
- font-family: ${p => p.theme.fontFamily.heading};
-
- @media (max-width: 375px) {
- word-wrap: break-word;
- }
-`
-
-export const StyledLogoWrapper = styled<{}, 'div'>('div')`
- width: 24px;
- height: 24px;
- margin: 8px;
-`
diff --git a/src/features/rewards/mobile/selectMobile/__snapshots__/spec.tsx.snap b/src/features/rewards/mobile/selectMobile/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 9c819a6df..000000000
--- a/src/features/rewards/mobile/selectMobile/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,21 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`SelectMobile tests basic tests matches the snapshot 1`] = `
-.c0 {
- width: 100%;
- background: #fff;
- height: 34px;
- font-size: 14px;
- border: 1px solid #DFDFE8;
- text-align-last: left;
-}
-
-.c0:focus {
- outline: 0;
-}
-
-
-`;
diff --git a/src/features/rewards/mobile/selectMobile/index.tsx b/src/features/rewards/mobile/selectMobile/index.tsx
deleted file mode 100644
index ddbfb734a..000000000
--- a/src/features/rewards/mobile/selectMobile/index.tsx
+++ /dev/null
@@ -1,93 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledSelect
-} from './style'
-import { getLocale } from '../../../../helpers'
-
-export type Amount = {
- value: string
- dataValue: string
- converted: string
-}
-
-export type Option = {
- value: string
- text: string
-}
-
-export interface Props {
- value?: string
- options?: Option[]
- floating?: boolean
- amountOptions?: Amount[]
- onChange?: (value: string) => void
-}
-
-export default class SelectMobile extends React.PureComponent {
-
- onChange = (event: React.ChangeEvent) => {
- if (this.props.onChange) {
- this.props.onChange(event.target.value)
- }
- }
-
- generateOptions = (options?: Option[]) => {
- if (!options) {
- return null
- }
-
- return (
- <>
- {options.map((option: Option) => {
- return (
-
- )
- })}
- >
- )
- }
-
- generateAmountOptions = (amountOptions?: Amount[]) => {
- if (!amountOptions) {
- return null
- }
-
- return (
- <>
- {amountOptions.map((amount: Amount) => {
- return (
-
- )
- })}
- >
- )
- }
-
- render () {
- const { options, floating, amountOptions, value } = this.props
-
- return (
-
- {
- amountOptions
- ? this.generateAmountOptions(amountOptions)
- : this.generateOptions(options)
- }
-
- )
- }
-}
diff --git a/src/features/rewards/mobile/selectMobile/spec.tsx b/src/features/rewards/mobile/selectMobile/spec.tsx
deleted file mode 100644
index 17dcad1d9..000000000
--- a/src/features/rewards/mobile/selectMobile/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import SelectMobile from './index'
-import { TestThemeProvider } from '../../../../theme'
-
-describe('SelectMobile tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#selectMobile').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/mobile/selectMobile/style.ts b/src/features/rewards/mobile/selectMobile/style.ts
deleted file mode 100644
index 6780a2d1f..000000000
--- a/src/features/rewards/mobile/selectMobile/style.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import styled from 'styled-components'
-
-interface StyleProps {
- floating?: boolean
-}
-
-export const StyledSelect = styled('select')`
- width: 100%;
- background: #fff;
- height: 34px;
- font-size: 14px;
- border: ${p => p.floating ? 'none' : '1px solid #DFDFE8'};
- text-align-last: ${p => p.floating ? 'right' : 'left'};
-
- &:focus {
- outline: 0;
- }
-`
diff --git a/src/features/rewards/mobile/settingsPageMobile/__snapshots__/spec.tsx.snap b/src/features/rewards/mobile/settingsPageMobile/__snapshots__/spec.tsx.snap
deleted file mode 100644
index f93757406..000000000
--- a/src/features/rewards/mobile/settingsPageMobile/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,26 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`SettingsPageMobile tests basic tests matches the snapshot 1`] = `
-.c0 {
- background: #e6e8f5;
- min-height: 100vh;
- width: 100%;
- padding-top: 35px;
- font-family: Muli,sans-serif;
-}
-
-.c1 {
- max-width: 1000px;
- margin: 0 auto;
- padding: 40px 10px 0 10px;
-}
-
-
-`;
diff --git a/src/features/rewards/mobile/settingsPageMobile/index.tsx b/src/features/rewards/mobile/settingsPageMobile/index.tsx
deleted file mode 100644
index ebb6adf45..000000000
--- a/src/features/rewards/mobile/settingsPageMobile/index.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledWrapper,
- StyledContent
-} from './style'
-
-export interface Props {
- id?: string
- children?: React.ReactNode
-}
-
-export default class SettingsPageMobile extends React.PureComponent {
- render () {
- const { id, children } = this.props
-
- return (
-
-
- {children}
-
-
- )
- }
-}
diff --git a/src/features/rewards/mobile/settingsPageMobile/spec.tsx b/src/features/rewards/mobile/settingsPageMobile/spec.tsx
deleted file mode 100644
index 18d5d2533..000000000
--- a/src/features/rewards/mobile/settingsPageMobile/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import SettingsPageMobile from './index'
-import { TestThemeProvider } from '../../../../theme'
-
-describe('SettingsPageMobile tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#page').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/mobile/settingsPageMobile/style.ts b/src/features/rewards/mobile/settingsPageMobile/style.ts
deleted file mode 100644
index 5fe8b3081..000000000
--- a/src/features/rewards/mobile/settingsPageMobile/style.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from '../../../../theme'
-
-export const StyledWrapper = styled<{}, 'div'>('div')`
- background: ${p => p.theme.color.subtleBackground};
- min-height: 100vh;
- width: 100%;
- padding-top: 35px;
- font-family: ${p => p.theme.fontFamily.body};
-`
-
-export const StyledContent = styled<{}, 'div'>('div')`
- max-width: 1000px;
- margin: 0 auto;
- padding: 40px 10px 0 10px;
-`
diff --git a/src/features/rewards/mobile/walletInfoHeader/__snapshots__/spec.tsx.snap b/src/features/rewards/mobile/walletInfoHeader/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 1c4e26258..000000000
--- a/src/features/rewards/mobile/walletInfoHeader/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,100 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`WalletInfoHeader tests basic tests matches the snapshot 1`] = `
-.c0 {
- width: 100%;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- border-radius: 6px;
- margin-bottom: 15px;
- font-family: Poppins,sans-serif;
- background: url(test-file-stub) no-repeat top left, linear-gradient(to bottom right,#392dd1 0%,#5813a6 100%) 100% no-repeat;
- -webkit-flex-direction: column;
- -ms-flex-direction: column;
- flex-direction: column;
- box-shadow: 0 2px 4px rgba(0,0,0,.2);
-}
-
-.c1 {
- padding: 16px 21px 14px 19px;
- position: relative;
-}
-
-.c2 {
- font-size: 16px;
- font-weight: 300;
- line-height: 1.38;
- -webkit-letter-spacing: -0.2px;
- -moz-letter-spacing: -0.2px;
- -ms-letter-spacing: -0.2px;
- letter-spacing: -0.2px;
- color: rgba(255,255,255,0.65);
-}
-
-.c3 {
- margin-top: -14px;
- text-align: center;
-}
-
-.c4 {
- font-size: 38px;
- line-height: 0.61;
- -webkit-letter-spacing: -0.4px;
- -moz-letter-spacing: -0.4px;
- -ms-letter-spacing: -0.4px;
- letter-spacing: -0.4px;
- color: #fff;
- font-weight: 300;
- margin-top: 10px;
-}
-
-.c5 {
- text-transform: uppercase;
- opacity: 0.66;
- font-family: Muli,sans-serif;
- font-size: 16px;
- line-height: 14px;
- color: #fff;
- -webkit-letter-spacing: 0px;
- -moz-letter-spacing: 0px;
- -ms-letter-spacing: 0px;
- letter-spacing: 0px;
-}
-
-@media (max-width:360px) {
- .c2 {
- font-size: 14px;
- }
-}
-
-
-`;
diff --git a/src/features/rewards/mobile/walletInfoHeader/assets/panel.svg b/src/features/rewards/mobile/walletInfoHeader/assets/panel.svg
deleted file mode 100644
index 886dc149a..000000000
--- a/src/features/rewards/mobile/walletInfoHeader/assets/panel.svg
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/src/features/rewards/mobile/walletInfoHeader/index.tsx b/src/features/rewards/mobile/walletInfoHeader/index.tsx
deleted file mode 100644
index 8edb3943b..000000000
--- a/src/features/rewards/mobile/walletInfoHeader/index.tsx
+++ /dev/null
@@ -1,50 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledWrapper,
- StyledHeader,
- StyledTitle,
- StyledBalance,
- StyledBalanceTokens,
- StyledBalanceCurrency,
- StyledBalanceConverted
-} from './style'
-import { getLocale } from '../../../../helpers'
-
-export interface Props {
- id?: string
- balance: string
- converted?: string
- onClick: () => void
-}
-
-export default class WalletInfoHeader extends React.PureComponent {
-
- render () {
- const { id, balance, converted, onClick } = this.props
-
- return (
-
-
- {getLocale('yourWallet')}
-
-
- {balance} BAT
-
- {
- converted
- ? {converted}
- : null
- }
-
-
-
- )
- }
-}
diff --git a/src/features/rewards/mobile/walletInfoHeader/spec.tsx b/src/features/rewards/mobile/walletInfoHeader/spec.tsx
deleted file mode 100644
index 5962e196d..000000000
--- a/src/features/rewards/mobile/walletInfoHeader/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import WalletInfoHeader from './index'
-import { TestThemeProvider } from '../../../../theme'
-
-describe('WalletInfoHeader tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#info-header').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/mobile/walletInfoHeader/style.ts b/src/features/rewards/mobile/walletInfoHeader/style.ts
deleted file mode 100644
index 6b6737ded..000000000
--- a/src/features/rewards/mobile/walletInfoHeader/style.ts
+++ /dev/null
@@ -1,68 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from '../../../../theme'
-import panelBgUrl from './assets/panel.svg'
-
-export const StyledWrapper = styled<{}, 'div'>('div')`
- width: 100%;
- display: flex;
- border-radius: 6px;
- margin-bottom: 15px;
- font-family: ${p => p.theme.fontFamily.heading};
- background: url(${panelBgUrl}) no-repeat top left,
- linear-gradient(to bottom right, #392dd1 0%, #5813a6 100%) 100% no-repeat;
- flex-direction: column;
- box-shadow: 0 2px 4px rgba(0,0,0,.2);
-`
-
-export const StyledHeader = styled<{}, 'div'>('div')`
- padding: 16px 21px 14px 19px;
- position: relative;
-`
-
-export const StyledTitle = styled<{}, 'div'>('div')`
- font-size: 16px;
- font-weight: 300;
- line-height: 1.38;
- letter-spacing: -0.2px;
- color: rgba(255, 255, 255, 0.65);
-
- @media (max-width: 360px) {
- font-size: 14px;
- }
-`
-
-export const StyledBalance = styled<{}, 'div'>('div')`
- margin-top: -14px;
- text-align: center;
-`
-
-export const StyledBalanceTokens = styled<{}, 'div'>('div')`
- font-size: 38px;
- line-height: 0.61;
- letter-spacing: -0.4px;
- color: #fff;
- font-weight: 300;
- margin-top: 10px;
-`
-
-export const StyledBalanceConverted = styled<{}, 'div'>('div')`
- font-family: Muli, sans-serif;
- font-size: 12px;
- line-height: 1.17;
- text-align: center;
- color: rgba(255, 255, 255, 0.65);
- margin: 8px 0;
-`
-
-export const StyledBalanceCurrency = styled<{}, 'span'>('span')`
- text-transform: uppercase;
- opacity: 0.66;
- font-family: Muli, sans-serif;
- font-size: 16px;
- line-height: 14px;
- color: #fff;
- letter-spacing: 0px;
-`
diff --git a/src/features/rewards/modalActivity/__snapshots__/spec.tsx.snap b/src/features/rewards/modalActivity/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 98e336a9e..000000000
--- a/src/features/rewards/modalActivity/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,500 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`ModalActivity tests basic tests matches the snapshot 1`] = `
-.c5 {
- font-family: Muli,sans-serif;
-}
-
-.c6 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- width: 100%;
- -webkit-box-pack: justify;
- -webkit-justify-content: space-between;
- -ms-flex-pack: justify;
- justify-content: space-between;
-}
-
-.c7 {
- -webkit-flex-basis: 40%;
- -ms-flex-preferred-size: 40%;
- flex-basis: 40%;
-}
-
-.c8 {
- -webkit-flex-basis: 378px;
- -ms-flex-preferred-size: 378px;
- flex-basis: 378px;
- -webkit-box-flex: 0;
- -webkit-flex-grow: 0;
- -ms-flex-positive: 0;
- flex-grow: 0;
- -webkit-flex-shrink: 1;
- -ms-flex-negative: 1;
- flex-shrink: 1;
- margin-bottom: 45px;
-}
-
-.c9 {
- margin-bottom: 103px;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
-}
-
-.c10 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- margin-right: 35px;
- background: none;
- border: none;
- cursor: pointer;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
-}
-
-.c13 {
- font-size: 14px;
- line-height: 1.43;
- color: #838391;
- margin-left: 13px;
-}
-
-.c15 {
- background-color: #f9f9fd;
- margin: 0 -50px;
- padding: 0 50px;
-}
-
-.c29 {
- max-width: 508px;
- margin-top: 46px;
- font-family: Muli,sans-serif;
- font-size: 12px;
- font-weight: 300;
- line-height: 1.5;
- color: #686978;
-}
-
-.c16 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-box-pack: justify;
- -webkit-justify-content: space-between;
- -ms-flex-pack: justify;
- justify-content: space-between;
- font-size: 14px;
- font-weight: 600;
- line-height: 2.79;
- -webkit-letter-spacing: 0.2px;
- -moz-letter-spacing: 0.2px;
- -ms-letter-spacing: 0.2px;
- letter-spacing: 0.2px;
- color: #4b4c5c;
- text-transform: uppercase;
- padding-top: 14px;
- margin-top: 28px;
-}
-
-.c21 {
- font-size: 14px;
- font-weight: 300;
- line-height: 2.79;
- -webkit-letter-spacing: 0.2px;
- -moz-letter-spacing: 0.2px;
- -ms-letter-spacing: 0.2px;
- letter-spacing: 0.2px;
- color: #4b4c5c;
- text-transform: none;
-}
-
-.c25 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- font-size: 12px;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- line-height: 2;
- color: #9e9fab;
- padding: 11px 0 32px;
-}
-
-.c28 {
- margin-left: 5px;
-}
-
-.c11 {
- color: #A1A8F2;
- width: 27px;
-}
-
-.c26 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- color: #392DD1;
- width: 24px;
- height: 24px;
-}
-
-.c23 {
- text-align: right;
-}
-
-.c24 {
- padding-right: 10px;
-}
-
-.c20 {
- text-align: center;
- padding: 30px 0;
- color: #999ea2;
- font-size: 14px;
-}
-
-.c17 {
- min-width: 100%;
- margin: 24px 0;
-}
-
-.c18 {
- text-transform: uppercase;
- text-align: left;
- font-family: Muli,sans-serif;
- font-size: 12px;
- font-weight: 500;
- border-bottom: 2px solid #dedfe4;
- border-top: 2px solid #dedfe4;
- color: #4B4C5C;
- padding: 12px 0;
-}
-
-.c22 {
- text-transform: uppercase;
- text-align: left;
- font-family: Muli,sans-serif;
- font-size: 12px;
- font-weight: 500;
- border-bottom: 2px solid #dedfe4;
- border-top: 2px solid #dedfe4;
- color: #4B4C5C;
- padding: 12px 0;
-}
-
-.c3 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-.c14 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-.c12 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-.c27 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-.c0 {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100vh;
- background: rgba(12,13,33,0.85);
- z-index: 99;
- padding: 0 20px;
- overflow: hidden;
-}
-
-.c1 {
- max-width: 920px;
- margin: 52px auto;
- background: #fff;
- border-radius: 6px;
- overflow: hidden;
- position: relative;
-}
-
-.c2 {
- position: absolute;
- top: 20px;
- right: 20px;
- cursor: pointer;
- width: 20px;
- height: 20px;
- color: #9E9FAB;
-}
-
-.c4 {
- padding: 48px 48px;
- overflow-y: auto;
- max-height: calc(100vh - 100px);
-}
-
-.c19 {
- text-align: right;
- padding-right: 14px;
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- MISSING: transactions
-
-
-
-
-
-
-
- MISSING: date
- |
-
- MISSING: type
- |
-
- MISSING: description
- |
-
-
- MISSING: amount
-
- |
-
-
-
-
-
-
-
-
- MISSING: contributeAllocation
-
-
- MISSING: paymentMonthly
-
-
-
-
-
-
-
-
-
- MISSING: rewardsContributeVisited
-
- |
-
-
- MISSING: rewardsContributeAttention
-
- |
-
-
- MISSING: payment
-
- |
-
-
-
-
-
-
-
-
-
- MISSING: braveVerified
-
-
-
-
-
- MISSING: pleaseNote
-
-
- MISSING: activityNote
-
-
- MISSING: activityCopy
-
-
-
-
-
-`;
diff --git a/src/features/rewards/modalActivity/index.tsx b/src/features/rewards/modalActivity/index.tsx
deleted file mode 100644
index 32c005fa7..000000000
--- a/src/features/rewards/modalActivity/index.tsx
+++ /dev/null
@@ -1,276 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-
-// Components
-import {
- StyledWrapper,
- StyledTitle,
- StyledSubTitle,
- StyledHeader,
- StyledLeft,
- StyledRight,
- StyledIconWrap,
- StyledIconText,
- StyledBalance,
- StyledWarning,
- StyledWarningText,
- StyledTables,
- StyledNote,
- StyledTableTitle,
- StyledTableSubTitle,
- StyledVerified,
- StyledVerifiedText,
- StyledSelectOption,
- StyledIcon,
- StyledClosing,
- StyledActionIcon,
- StyledAlertWrapper,
- StyledWarningWrapper,
- StyledVerifiedIcon
-} from './style'
-import TableContribute, { DetailRow as ContributeRow } from '../tableContribute'
-import TableTransactions, { DetailRow as TransactionRow } from '../tableTransactions'
-import { Select, ControlWrapper, Modal } from '../../../components'
-import { AlertCircleIcon, DownloadIcon, PrintIcon, VerifiedSIcon } from '../../../components/icons'
-import ListToken from '../listToken'
-import { Type as TokenType } from '../tokens'
-
-// Utils
-import { getLocale } from '../../../helpers'
-
-export interface Token {
- value: string
- converted: string
- isNegative?: boolean
-}
-
-export type SummaryType = 'deposit' | 'grant' | 'ads' | 'contribute' | 'recurring' | 'donations'
-
-export interface SummaryItem {
- type: SummaryType
- token: Token
- text: string
- notPaid?: boolean
-}
-
-export interface Props {
- contributeRows: ContributeRow[]
- onClose: () => void
- onPrint: () => void
- onDownloadPDF: () => void
- onMonthChange: (value: string, child: React.ReactNode) => void
- months: Record
- currentMonth: string
- transactionRows: TransactionRow[]
- openBalance?: Token
- closingBalance?: Token
- id?: string
- summary: SummaryItem[]
- total: Token
- paymentDay: number
-}
-
-export default class ModalActivity extends React.PureComponent {
- private colors: Record = {
- deposit: 'earnings',
- grant: 'earnings',
- ads: 'earnings',
- contribute: 'contribute',
- recurring: 'donation',
- donations: 'donation'
- }
-
- private hasWarnings: boolean = false
-
- get headers () {
- return [
- getLocale('rewardsContributeVisited'),
- getLocale('rewardsContributeAttention'),
- getLocale('payment')
- ]
- }
-
- get selectTitle () {
- return (
-
- {getLocale('braveRewards')} {getLocale('walletActivity')}
-
- )
- }
-
- getSummaryBox = () => {
- this.hasWarnings = false
- let items: React.ReactNode[]
-
- if (!this.props.summary) {
- return null
- }
-
- items = this.props.summary.map((item: SummaryItem, i: number) => {
- let title: React.ReactNode = item.text
-
- if (item.notPaid) {
- this.hasWarnings = true
- title = (
-
- {title}
-
- )
- }
-
- return (
-
- )
- })
-
- items.push(
- {getLocale('total')}}
- value={this.props.total.value}
- converted={this.props.total.converted}
- size={'small'}
- border={'last'}
- />
- )
-
- return items
- }
-
- render () {
- const {
- id,
- onClose,
- contributeRows,
- onMonthChange,
- currentMonth,
- openBalance,
- closingBalance,
- months,
- transactionRows,
- paymentDay
- } = this.props
-
- return (
-
-
-
-
- {
- months
- ?
-
-
- : null
- }
- {
- openBalance && closingBalance
- ?
-
-
- {getLocale('closeBalance')}}
- value={closingBalance.value}
- converted={closingBalance.converted}
- color={'contribute'}
- border={'last'}
- />
-
-
- : null
- }
-
-
-
-
-
-
-
-
- {getLocale('print')}
-
-
-
-
-
- {getLocale('downloadPDF')}
-
-
- {this.getSummaryBox()}
-
-
- {
- this.hasWarnings
- ?
-
-
-
-
- {getLocale('paymentNotMade')} {getLocale('paymentWarning')}
-
-
- : null
- }
-
- {getLocale('transactions')}
-
-
- {getLocale('contributeAllocation')}
-
- {getLocale('paymentMonthly', { day: paymentDay })}
-
-
-
-
-
-
-
- {getLocale('braveVerified')}
-
-
-
- {getLocale('pleaseNote')} {getLocale('activityNote')}
-
- {getLocale('activityCopy')}
-
-
-
- )
- }
-}
diff --git a/src/features/rewards/modalActivity/spec.tsx b/src/features/rewards/modalActivity/spec.tsx
deleted file mode 100644
index 2a29d8297..000000000
--- a/src/features/rewards/modalActivity/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import ModalActivity from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('ModalActivity tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#activity').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/modalActivity/style.ts b/src/features/rewards/modalActivity/style.ts
deleted file mode 100644
index df640b010..000000000
--- a/src/features/rewards/modalActivity/style.ts
+++ /dev/null
@@ -1,166 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from '../../../theme'
-
-export const StyledWrapper = styled<{}, 'div'>('div')`
- font-family: ${p => p.theme.fontFamily.body};
-`
-
-export const StyledTitle = styled<{}, 'div'>('div')`
- font-weight: 600;
- color: #1B1D2F;
- font-family: ${p => p.theme.fontFamily.heading};
- font-size: 16px;
- line-height: 2;
-`
-
-export const StyledSubTitle = styled<{}, 'span'>('span')`
- color: #838391;
- font-weight: normal;
-`
-
-export const StyledHeader = styled<{}, 'div'>('div')`
- display: flex;
- width: 100%;
- justify-content: space-between;
-`
-
-export const StyledLeft = styled<{}, 'div'>('div')`
- flex-basis: 40%;
-`
-
-export const StyledRight = styled<{}, 'div'>('div')`
- flex-basis: 378px;
- flex-grow: 0;
- flex-shrink: 1;
- margin-bottom: 45px;
-`
-
-export const StyledSelectOption = styled<{}, 'div'>('div')`
- font-size: 22px;
- font-weight: 300;
- color: #4C54D2;
-`
-
-export const StyledIconWrap = styled<{}, 'div'>('div')`
- margin-bottom: 103px;
- display: flex;
-`
-
-export const StyledIcon = styled<{}, 'button'>('button')`
- display: flex;
- margin-right: 35px;
- background: none;
- border: none;
- cursor: pointer;
- align-items: center;
-`
-
-export const StyledIconText = styled<{}, 'div'>('div')`
- font-size: 14px;
- line-height: 1.43;
- color: #838391;
- margin-left: 13px;
-`
-
-export const StyledBalance = styled<{}, 'div'>('div')`
- margin-top: 41px;
-`
-
-export const StyledTables = styled<{}, 'div'>('div')`
- background-color: #f9f9fd;
- margin: 0 -50px;
- padding: 0 50px;
-`
-
-export const StyledWarning = styled<{}, 'div'>('div')`
- display: flex;
- justify-content: center;
- border-top: 1px solid #ebecf0;
- margin: 0 -50px;
- padding: 17px 50px 0;
- align-items: flex-start;
-`
-
-export const StyledWarningText = styled<{}, 'div'>('div')`
- max-width: 508px;
- font-family: Muli, sans-serif;
- font-size: 12px;
- font-weight: 300;
- line-height: 1.5;
- color: #686978;
- padding-left: 8px;
-`
-
-export const StyledNote = styled<{}, 'div'>('div')`
- max-width: 508px;
- margin-top: 46px;
- font-family: Muli, sans-serif;
- font-size: 12px;
- font-weight: 300;
- line-height: 1.5;
- color: #686978;
-`
-
-export const StyledTableTitle = styled<{}, 'div'>('div')`
- display: flex;
- justify-content: space-between;
- font-size: 14px;
- font-weight: 600;
- line-height: 2.79;
- letter-spacing: 0.2px;
- color: #4b4c5c;
- text-transform: uppercase;
- padding-top: 14px;
- margin-top: 28px;
-`
-
-export const StyledTableSubTitle = styled<{}, 'div'>('div')`
- font-size: 14px;
- font-weight: 300;
- line-height: 2.79;
- letter-spacing: 0.2px;
- color: #4b4c5c;
- text-transform: none;
-`
-
-export const StyledVerified = styled<{}, 'div'>('div')`
- display: flex;
- font-size: 12px;
- align-items: center;
- line-height: 2;
- color: #9e9fab;
- padding: 11px 0 32px;
-`
-
-export const StyledVerifiedText = styled<{}, 'div'>('div')`
- margin-left: 5px;
-`
-
-export const StyledClosing = styled<{}, 'div'>('div')`
- margin-top: -10px;
-`
-
-export const StyledActionIcon = styled<{}, 'span'>('span')`
- color: #A1A8F2;
- width: 27px;
-`
-
-export const StyledAlertWrapper = styled<{}, 'div'>('div')`
- color: #E9AB18;
- width: 20px;
- margin-left: 3px;
-`
-
-export const StyledWarningWrapper = styled<{}, 'div'>('div')`
- display: flex;
-`
-
-export const StyledVerifiedIcon = styled<{}, 'div'>('div')`
- display: flex;
- color: #392DD1;
- width: 24px;
- height: 24px;
-`
diff --git a/src/features/rewards/modalAddFunds/__snapshots__/spec.tsx.snap b/src/features/rewards/modalAddFunds/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 8d05a5297..000000000
--- a/src/features/rewards/modalAddFunds/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,169 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`ModalAddFunds tests basic tests matches the snapshot 1`] = `
-.c5 {
- font-family: Poppins,sans-serif;
-}
-
-.c6 {
- font-size: 32px;
- font-weight: 500;
- color: #4b4c5c;
- margin-bottom: 10px;
- line-height: 1.3;
-}
-
-.c9 {
- max-width: 508px;
- font-family: Muli,sans-serif;
- font-size: 12px;
- font-weight: 300;
- line-height: 1.5;
- color: #686978;
-}
-
-.c8 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-flex-wrap: wrap;
- -ms-flex-wrap: wrap;
- flex-wrap: wrap;
- margin: 0 -15px;
- -webkit-align-items: stretch;
- -webkit-box-align: stretch;
- -ms-flex-align: stretch;
- align-items: stretch;
- -webkit-box-pack: center;
- -webkit-justify-content: center;
- -ms-flex-pack: center;
- justify-content: center;
-}
-
-.c10 {
- color: #4c54d2;
- -webkit-text-decoration: none;
- text-decoration: none;
-}
-
-.c10:hover {
- -webkit-text-decoration: underline;
- text-decoration: underline;
-}
-
-.c7 {
- margin-bottom: 30px;
- padding: 0;
- font-size: 15px;
- line-height: 1.4;
-}
-
-.c0 {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100vh;
- background: rgba(12,13,33,0.85);
- z-index: 99;
- padding: 0 20px;
- overflow: hidden;
-}
-
-.c1 {
- max-width: 920px;
- margin: 52px auto;
- background: #fff;
- border-radius: 6px;
- overflow: hidden;
- position: relative;
-}
-
-.c2 {
- position: absolute;
- top: 20px;
- right: 20px;
- cursor: pointer;
- width: 20px;
- height: 20px;
- color: #9E9FAB;
-}
-
-.c4 {
- padding: 48px 48px;
- overflow-y: auto;
- max-height: calc(100vh - 100px);
-}
-
-.c3 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-
-
-
-
-
-
- MISSING: addFundsTitle
-
-
- MISSING: addFundsText
-
-
-
-
-
-
-
-`;
diff --git a/src/features/rewards/modalAddFunds/index.tsx b/src/features/rewards/modalAddFunds/index.tsx
deleted file mode 100644
index 34ca376a9..000000000
--- a/src/features/rewards/modalAddFunds/index.tsx
+++ /dev/null
@@ -1,141 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledWrapper,
- StyledTitle,
- StyledNote,
- StyledAddresses,
- StyledAddress,
- StyledLogo,
- StyledData,
- StyledShowQR,
- StyledQRImageWrapper,
- StyledQRImage,
- StyledAddressTitle,
- StyledLink,
- StyledHeader,
- StyledWalletAddress,
- StyledQRButton,
- StyledText
-} from './style'
-import Modal from '../../../components/popupModals/modal/index'
-import { getLocale } from '../../../helpers'
-import Input from '../../../components/formControls/input'
-import { BatColorIcon, BitcoinColorIcon, EthereumColorIcon, LitecoinColorIcon } from '../../../components/icons'
-
-export type Type = 'BAT' | 'ETH' | 'BTC' | 'LTC'
-
-export interface Address {
- address: string
- qr: string | null
- type: Type
-}
-
-export interface Props {
- onClose: () => void
- id?: string
- isMobile?: boolean
- addresses: Address[]
-}
-
-const icons: Record = {
- BAT: ,
- ETH: ,
- BTC: ,
- LTC:
-}
-
-interface State {
- current?: Type
-}
-
-export default class ModalAddFunds extends React.PureComponent {
- constructor (props: Props) {
- super(props)
- this.state = {
- current: undefined
- }
- }
-
- onQR = (type: Type) => {
- this.setState({
- current: type
- })
- }
-
- getAddress = (address: Address) => {
- const { isMobile } = this.props
- const current = address.type === this.state.current
-
- return (
-
-
-
- {icons[address.type]}
-
-
- {getLocale(`title${address.type}`)}
-
-
- {getLocale('walletAddress')}
-
-
-
- {
- address.qr
- ? (<>
-
- {
- current
- ?
- :
-
-
- }
-
-
- >)
- : null
- }
-
- )
- }
-
- render () {
- const { id, onClose, addresses, isMobile } = this.props
-
- return (
-
-
- {getLocale('addFundsTitle')}
-
- {getLocale('addFundsText')}
-
-
- {
- addresses && addresses.map((address: Address) => this.getAddress(address))
- }
-
-
- {getLocale('addFundsNote')}
- {getLocale('addFundsFAQ')}
- .
-
-
-
- )
- }
-}
diff --git a/src/features/rewards/modalAddFunds/spec.tsx b/src/features/rewards/modalAddFunds/spec.tsx
deleted file mode 100644
index 9fdc48598..000000000
--- a/src/features/rewards/modalAddFunds/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import ModalAddFunds from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('ModalAddFunds tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#modal').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/modalAddFunds/style.ts b/src/features/rewards/modalAddFunds/style.ts
deleted file mode 100644
index 997c23639..000000000
--- a/src/features/rewards/modalAddFunds/style.ts
+++ /dev/null
@@ -1,129 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-import Button, { Props as ButtonProps } from '../../../components/buttonsIndicators/button'
-import { ComponentType } from 'react'
-
-interface StyleProps {
- isMobile: boolean
-}
-
-export const StyledWrapper = styled<{}, 'div'>('div')`
- font-family: Poppins, sans-serif;
-`
-
-export const StyledTitle = styled<{}, 'div'>('div')`
- font-size: 32px;
- font-weight: 500;
- color: #4b4c5c;
- margin-bottom: 10px;
- line-height: 1.3;
-`
-
-export const StyledNote = styled<{}, 'div'>('div') `
- max-width: 508px;
- font-family: Muli,sans-serif;
- font-size: 12px;
- font-weight: 300;
- line-height: 1.5;
- color: #686978;
-`
-
-export const StyledAddresses = styled<{}, 'div'>('div') `
- display: flex;
- flex-wrap: wrap;
- margin: 0 -15px;
- align-items: stretch;
- justify-content: center;
-`
-
-export const StyledAddress = styled('div') `
- flex-basis: ${p => p.isMobile ? 100 : 50}%;
- flex-shrink: 0;
- flex-grow: 0;
- width: ${p => p.isMobile ? 100 : 50}%;
- box-sizing: border-box;
- padding: 0 15px 26px;
-`
-
-export const StyledLogo = styled<{}, 'div'>('div') `
- height: 60px;
- flex-basis: 60px;
- flex-shrink: 0;
- margin-right: 20px;
-`
-
-export const StyledData = styled<{}, 'div'>('div') `
- flex-basis: 100%;
- text-align: center;
- margin-top: 22px;
- color: #686978;
-`
-
-export const StyledAddressTitle = styled<{}, 'div'>('div') `
- flex-basis: 30%;
- flex-grow: 1;
- font-size: 16px;
- line-height: 1.38;
- color: #4b4c5c;
-`
-
-export const StyledShowQR = styled<{}, 'div'>('div') `
- width: 110px;
- height: 110px;
- justify-content: center;
- display: flex;
- background: #eee;
-`
-
-export const StyledQRImageWrapper = styled<{}, 'div'>('div') `
- flex-basis: 100%;
- justify-content: center;
- display: flex;
- margin: 15px 0 10px;
- position: relative;
-`
-
-export const StyledQRImage = styled<{}, 'img'>('img') `
- width: 110px;
- height: 110px;
-`
-
-export const StyledQRButton = styled(Button as ComponentType) `
- position: absolute;
- top: calc(50% - 23px);
- font-weight: 400;
-`
-
-export const StyledLink = styled<{}, 'a'>('a') `
- color: #4c54d2;
- text-decoration: none;
-
- &:hover {
- text-decoration: underline;
- }
-`
-
-export const StyledHeader = styled<{}, 'div'>('div') `
- display: flex;
- align-items: center;
- flex-wrap: wrap;
-`
-
-export const StyledWalletAddress = styled<{}, 'div'>('div') `
- font-size: 12px;
- font-weight: 500;
- line-height: 1;
- color: #4b4c5c;
- text-align: left;
- margin-bottom: 4px;
-`
-
-export const StyledText = styled<{}, 'p'>('p') `
- margin-bottom: 30px;
- padding: 0;
- font-size: 15px;
- line-height: 1.4;
-`
diff --git a/src/features/rewards/modalBackupRestore/__snapshots__/spec.tsx.snap b/src/features/rewards/modalBackupRestore/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 47faec597..000000000
--- a/src/features/rewards/modalBackupRestore/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,467 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`ModalBackupRestore tests basic tests matches the snapshot 1`] = `
-.c26 {
- --button-main-color: #FB542B;
- --button-main-color-hover: #FB542B;
- --button-main-color-active: #ffb8a6;
- --button-state-color: var(--button-main-color);
- --icon-size: 16px;
- --icon-spacing: 6px;
- --webkit-appearance: none;
- box-sizing: border-box;
- background: none;
- border: none;
- outline-color: transparent;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-flex-direction: row-reverse;
- -ms-flex-direction: row-reverse;
- flex-direction: row-reverse;
- -webkit-box-pack: center;
- -webkit-justify-content: center;
- -ms-flex-pack: center;
- justify-content: center;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- font-family: Poppins,sans-serif;
- cursor: pointer;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- font-size: 13px;
- border-radius: 20px;
- width: auto;
- min-width: 104px;
- padding: 11px 15px;
-}
-
-.c26:hover:enabled {
- --button-state-color: var(--button-main-color-hover);
-}
-
-.c26:active:enabled {
- --button-state-color: var(--button-main-color-active);
-}
-
-.c28 {
- color: #fff;
- background: var(--button-state-color);
- border: 1px solid var(--button-state-color);
-}
-
-.c25 {
- border: 1px solid;
- color: var(--button-state-color);
-}
-
-.c27 {
- min-height: var(--icon-size);
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- text-align: center;
- -webkit-letter-spacing: 0;
- -moz-letter-spacing: 0;
- -ms-letter-spacing: 0;
- letter-spacing: 0;
- font-weight: 500;
- text-transform: none;
- line-height: 1;
-}
-
-.c18 {
- color: #4c54d2;
- cursor: pointer;
-}
-
-.c23 {
- margin-top: 40px;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-box-pack: center;
- -webkit-justify-content: center;
- -ms-flex-pack: center;
- justify-content: center;
-}
-
-.c24 {
- margin: 0 8px;
-}
-
-.c5 {
- width: 100%;
- text-align: center;
- margin-bottom: 20px;
-}
-
-.c6 {
- font-size: 22px;
- font-weight: normal;
- -webkit-letter-spacing: 0;
- -moz-letter-spacing: 0;
- -ms-letter-spacing: 0;
- letter-spacing: 0;
- line-height: 40px;
- font-family: Poppins,sans-serif;
-}
-
-.c8 {
- margin: 0 auto;
- max-width: 400px;
-}
-
-.c7 {
- width: 100%;
- margin-bottom: 30px;
-}
-
-.c22 {
- font-size: 16px;
- font-weight: 200;
- -webkit-letter-spacing: 0;
- -moz-letter-spacing: 0;
- -ms-letter-spacing: 0;
- letter-spacing: 0;
- line-height: 26px;
- font-family: Muli,sans-serif;
-}
-
-.c21 {
- margin-bottom: 25px;
-}
-
-.c3 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-.c16 {
- width: 100%;
- margin-bottom: 24px;
-}
-
-.c17 {
- width: 100%;
- font-family: Muli,sans-serif;
- line-height: normal;
- font-size: 14px;
- font-weight: 600;
- margin-bottom: 8px;
- --controlWrapper-label-color: #686978;
- color: var(--controlWrapper-label-color);
-}
-
-.c0 {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100vh;
- background: rgba(12,13,33,0.85);
- z-index: 99;
- padding: 0 20px;
- overflow: hidden;
-}
-
-.c1 {
- max-width: 666px;
- margin: 52px auto;
- background: #fff;
- border-radius: 6px;
- overflow: hidden;
- position: relative;
-}
-
-.c2 {
- position: absolute;
- top: 20px;
- right: 20px;
- cursor: pointer;
- width: 20px;
- height: 20px;
- color: #9E9FAB;
-}
-
-.c4 {
- padding: 48px 48px;
- overflow-y: auto;
- max-height: calc(100vh - 100px);
-}
-
-.c19 {
- width: 100%;
-}
-
-.c20 {
- min-height: 140px;
- box-sizing: border-box;
- width: 100%;
- font-family: Muli,sans-serif;
- border: 1px solid #DFDFE8;
- color: #686978;
- border-radius: 6px;
- padding: 15px 20px;
- font-size: 16px;
- line-height: 26px;
-}
-
-.c20:disabled {
- background: #fff;
-}
-
-.c20:focus {
- border-color: #A1A8F2;
- outline: none;
-}
-
-.c9 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- font-family: Poppins,sans-serif;
-}
-
-.c10 {
- position: relative;
- display: block;
- width: 100%;
- height: 43px;
- cursor: pointer;
-}
-
-.c11 {
- width: 100%;
- height: 100%;
- background: #DFDFE8;
- border-radius: 21.5px 21.5px 21.5px 21.5px;
-}
-
-.c15 {
- top: -17px;
- width: 50%;
- height: 37px;
- background: #FFFFFF;
- border-radius: 21.5px 21.5px 21.5px 21.5px;
- position: relative;
- -webkit-transition: all .4s ease;
- transition: all .4s ease;
- -webkit-transform: translate(calc(97%),calc(-50% - 4px));
- -ms-transform: translate(calc(97%),calc(-50% - 4px));
- transform: translate(calc(97%),calc(-50% - 4px));
- box-shadow: 0 3px 3px rgba(0,0,0,0.05);
-}
-
-.c12 {
- width: 50%;
- display: block;
- height: 100%;
- float: left;
-}
-
-.c14 {
- width: 50%;
- display: block;
- height: 100%;
- float: right;
-}
-
-.c13 {
- z-index: 9;
- position: relative;
- font-size: 14px;
- width: 70%;
- margin: 13px auto 0 auto;
- text-overflow: ellipsis;
- display: block;
- overflow: hidden;
- text-align: center;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- color: #84889c;
- font-weight: normal;
-}
-
-
-
-
-
-
-
- MISSING: manageWallet
-
-
-
-
-
- MISSING: rewardsRestoreText4
-
-
-
-
-
-
-
-
-
-
- MISSING: rewardsRestoreText3
-
-
-
-
-
-
-
-
-
-`;
diff --git a/src/features/rewards/modalBackupRestore/index.tsx b/src/features/rewards/modalBackupRestore/index.tsx
deleted file mode 100644
index 7a359c51f..000000000
--- a/src/features/rewards/modalBackupRestore/index.tsx
+++ /dev/null
@@ -1,284 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledContent,
- StyledImport,
- StyleButtonWrapper,
- StyledActionsWrapper,
- StyledDoneWrapper,
- StyledStatus,
- GroupedButton,
- ActionButton,
- StyledTitle,
- StyledTitleWrapper,
- StyledSafe,
- StyledTabWrapper,
- StyledControlWrapper,
- StyledText,
- StyledTextWrapper
-} from './style'
-import { TextArea, Modal, Button } from '../../../components'
-import { getLocale } from '../../../helpers'
-import { Alert, Tab } from '../'
-import ControlWrapper from '../../../components/formControls/controlWrapper'
-
-export interface Props {
- backupKey: string
- activeTabId: number
- onTabChange: () => void
- onClose: () => void
- onCopy?: (key: string) => void
- onPrint?: (key: string) => void
- onSaveFile?: (key: string) => void
- onRestore: (key: string) => void
- error?: React.ReactNode
- id?: string
- testId?: string
- funds?: string
-}
-
-interface State {
- recoveryKey: string
- errorShown: boolean
-}
-
-/*
- TODO
- - add error flow
- */
-export default class ModalBackupRestore extends React.PureComponent {
-
- constructor (props: Props) {
- super(props)
- this.state = {
- recoveryKey: '',
- errorShown: false
- }
- }
- onFileUpload = (inputFile: React.ChangeEvent) => {
- const input: HTMLInputElement = inputFile.target
- const self = this
-
- if (!input.files) {
- return
- }
-
- const reader = new FileReader()
- reader.onload = function () {
- if (reader.result) {
- self.onRestore((reader.result.toString() || '').trim())
- } else {
- self.onRestore('')
- }
- }
-
- try {
- reader.readAsText(input.files[0])
- } catch (e) {
- self.onRestore('')
- }
- }
-
- setRecoveryKey = (event: React.ChangeEvent) => {
- this.setState({
- errorShown: false,
- recoveryKey: event.target.value
- })
- }
-
- onRestore = (key?: string) => {
- key = typeof key === 'string' ? key : this.state.recoveryKey
- this.props.onRestore(key)
- }
-
- componentWillReceiveProps (nextProps: Props) {
- if (nextProps.error) {
- this.setState({
- errorShown: true
- })
- }
- }
-
- getBackup = () => {
- const {
- backupKey,
- onClose,
- onCopy,
- onPrint,
- onSaveFile
- } = this.props
-
- return (
- <>
-
-
-
-
- {
- onCopy
- ?
- : null
- }
- {
- onPrint
- ?
- : null
- }
- {
- onSaveFile
- ?
- : null
- }
-
-
-
- {getLocale('rewardsBackupText2')}
-
- {getLocale('rewardsBackupText3')}
-
-
-
-
- >
- )
- }
-
- getRestore = () => {
- const { error, onClose, funds } = this.props
- const errorShown = error && this.state.errorShown
-
- return (
- <>
- {
- funds
- ?
-
- {`Backup your wallet before replacing. Or you will lose the fund, ${funds}, in your current wallet.`}
-
-
- : null
- }
-
- {getLocale('rewardsRestoreText4')}
- {getLocale('import')}
-
-
- >
- }
- >
-
-
- {
- errorShown
- ?
-
- {error}
-
-
- : null
- }
-
-
- {getLocale('rewardsRestoreText3')}
-
-
-
-
-
-
- >
- )
- }
-
- render () {
- const {
- id,
- activeTabId,
- onClose,
- onTabChange,
- testId
- } = this.props
-
- return (
-
-
-
- {getLocale('manageWallet')}
-
-
-
-
-
-
-
- {
- activeTabId === 0
- ? this.getBackup()
- : this.getRestore()
- }
-
- )
- }
-}
diff --git a/src/features/rewards/modalBackupRestore/spec.tsx b/src/features/rewards/modalBackupRestore/spec.tsx
deleted file mode 100644
index 08e546cf6..000000000
--- a/src/features/rewards/modalBackupRestore/spec.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import ModalBackupRestore from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('ModalBackupRestore tests', () => {
- const baseComponent = (props?: object) => (
-
- {}}
- onCopy={() => {}}
- onPrint={() => {}}
- onSaveFile={() => {}}
- onRestore={() => {}}
- onImport={() => {}}
- onTabChange={() => {}}
- {...props}
- />
-
- )
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#modal').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/modalBackupRestore/style.ts b/src/features/rewards/modalBackupRestore/style.ts
deleted file mode 100644
index 4cf6c67b0..000000000
--- a/src/features/rewards/modalBackupRestore/style.ts
+++ /dev/null
@@ -1,108 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-import { ComponentType } from 'react'
-import styled from '../../../theme'
-import Button, { Props as ButtonProps } from '../../../components/buttonsIndicators/button'
-
-interface StyleProps {
- isError?: boolean
- error?: boolean
-}
-
-export const StyledContent = styled<{}, 'div'>('div')`
- font-size: 14px;
- font-family: Muli, sans-serif;
- letter-spacing: 0;
- font-weight: 200;
- line-height: 26px;
- margin-top: 40px;
-`
-
-export const StyledImport = styled<{}, 'label'>('label')`
- color: #4c54d2;
- cursor: pointer;
-`
-
-export const StyleButtonWrapper = styled<{}, 'div'>('div')`
- display: flex;
- margin-top: 20px;
- justify-content: center;
-`
-
-export const GroupedButton = styled(Button as ComponentType)`
- margin: 0 4px;
-
- @media (max-width: 410px) {
- min-width: 74px;
- font-size: 9px;
- }
- @media (max-width: 370px) {
- min-width: 65px;
- font-size: 9px;
- }
-`
-
-export const StyledDoneWrapper = styled<{}, 'div'>('div')`
- display: flex;
- justify-content: center;
- margin-top: 40px;
-`
-
-export const StyledStatus = styled('div')`
- margin: ${p => p.isError ? 0 : -16}px 0 16px;
- border-radius: 6px;
- overflow: hidden;
-`
-
-export const StyledActionsWrapper = styled<{}, 'div'>('div')`
- margin-top: 40px;
- display: flex;
- justify-content: center;
-`
-
-export const ActionButton = styled(Button as ComponentType)`
- margin: 0 8px;
-`
-
-export const StyledTitleWrapper = styled<{}, 'div'>('div')`
- width: 100%;
- text-align: center;
- margin-bottom: 20px;
-`
-
-export const StyledTitle = styled<{}, 'span'>('span')`
- font-size: 22px;
- font-weight: normal;
- letter-spacing: 0;
- line-height: 40px;
- font-family: ${p => p.theme.fontFamily.heading};
-`
-
-export const StyledSafe = styled<{}, 'span'>('span')`
- font-weight: 700;
- margin-right: 3px;
- color: ${p => p.theme.color.brandBatInteracting};
-`
-
-export const StyledTabWrapper = styled<{}, 'div'>('div')`
- margin: 0 auto;
- max-width: 400px;
-`
-
-export const StyledControlWrapper = styled<{}, 'div'>('div')`
- width: 100%;
- margin-bottom: 30px;
-`
-
-export const StyledText = styled<{}, 'p'>('p')`
- font-size: 16px;
- font-weight: 200;
- letter-spacing: 0;
- line-height: 26px;
- font-family: Muli, sans-serif;
-`
-
-export const StyledTextWrapper = styled<{}, 'div'>('div')`
- margin-bottom: 25px;
-`
diff --git a/src/features/rewards/modalContribute/__snapshots__/spec.tsx.snap b/src/features/rewards/modalContribute/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 5a5531133..000000000
--- a/src/features/rewards/modalContribute/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,331 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`ModalContribute tests basic tests matches the snapshot 1`] = `
-.c5 {
- font-family: Poppins,sans-serif;
-}
-
-.c7 {
- font-size: 16px;
- font-weight: 600;
- line-height: 2;
- color: #4b4c5c;
- margin-bottom: 20px;
-}
-
-.c17 {
- font-size: 16px;
- color: #4b4c5c;
- margin: 30px 0px 20px;
-}
-
-.c18 {
- font-weight: 500;
- color: #0c0d21;
-}
-
-.c8 {
- margin: 0 auto 30px;
-}
-
-.c6 {
- width: 100%;
- margin-bottom: 30px;
-}
-
-.c3 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-.c0 {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100vh;
- background: rgba(12,13,33,0.85);
- z-index: 99;
- padding: 0 20px;
- overflow: hidden;
-}
-
-.c1 {
- max-width: 666px;
- margin: 52px auto;
- background: #fff;
- border-radius: 6px;
- overflow: hidden;
- position: relative;
-}
-
-.c2 {
- position: absolute;
- top: 20px;
- right: 20px;
- cursor: pointer;
- width: 20px;
- height: 20px;
- color: #9E9FAB;
-}
-
-.c4 {
- padding: 48px 48px;
- overflow-y: auto;
- max-height: calc(100vh - 100px);
-}
-
-.c23 {
- text-align: center;
- padding: 30px 0;
- color: #999ea2;
- font-size: 14px;
-}
-
-.c19 {
- min-width: 100%;
- margin: 24px 0;
-}
-
-.c20 {
- text-transform: uppercase;
- text-align: left;
- font-family: Muli,sans-serif;
- font-size: 12px;
- font-weight: 500;
- border-bottom: 2px solid #dedfe4;
- border-top: 2px solid #dedfe4;
- color: #4B4C5C;
- padding: 12px 0;
-}
-
-.c22 {
- text-align: right;
-}
-
-.c21 {
- padding-right: 10px;
-}
-
-.c9 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- font-family: Poppins,sans-serif;
-}
-
-.c10 {
- position: relative;
- display: block;
- width: 100%;
- height: 43px;
- cursor: pointer;
-}
-
-.c11 {
- width: 100%;
- height: 100%;
- background: #DFDFE8;
- border-radius: 21.5px 21.5px 21.5px 21.5px;
-}
-
-.c16 {
- top: -17px;
- width: 50%;
- height: 37px;
- background: #FFFFFF;
- border-radius: 21.5px 21.5px 21.5px 21.5px;
- position: relative;
- -webkit-transition: all .4s ease;
- transition: all .4s ease;
- -webkit-transform: translate(calc(2%),calc(-50% - 4px));
- -ms-transform: translate(calc(2%),calc(-50% - 4px));
- transform: translate(calc(2%),calc(-50% - 4px));
- box-shadow: 0 3px 3px rgba(0,0,0,0.05);
-}
-
-.c12 {
- width: 50%;
- display: block;
- height: 100%;
- float: left;
-}
-
-.c14 {
- width: 50%;
- display: block;
- height: 100%;
- float: right;
-}
-
-.c13 {
- z-index: 9;
- position: relative;
- font-size: 14px;
- width: 70%;
- margin: 13px auto 0 auto;
- text-overflow: ellipsis;
- display: block;
- overflow: hidden;
- text-align: center;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- color: #4C54D2;
- font-weight: 500;
-}
-
-.c15 {
- z-index: 9;
- position: relative;
- font-size: 14px;
- width: 70%;
- margin: 13px auto 0 auto;
- text-overflow: ellipsis;
- display: block;
- overflow: hidden;
- text-align: center;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- color: #84889c;
- font-weight: normal;
-}
-
-
-
-
-
-
-
-
- MISSING: rewardsContribute
-
-
-
-
-
-
-
- MISSING: supportedSites (0)
-
-
-
-
- MISSING: excludedSites (0)
-
-
-
-
-
-
-
-
-
- MISSING: rewardsExcludedText1
-
-
- 0
-
-
- MISSING: rewardsExcludedText2
-
-
-
-
-
-
-
-
- MISSING: site
-
- |
-
-
-
-
- |
-
-
-
-
-
-
-
-
-
-
-`;
diff --git a/src/features/rewards/modalContribute/index.tsx b/src/features/rewards/modalContribute/index.tsx
deleted file mode 100644
index 54b02f109..000000000
--- a/src/features/rewards/modalContribute/index.tsx
+++ /dev/null
@@ -1,141 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledWrapper,
- StyledTitle,
- StyledContent,
- StyledNum,
- StyledTabWrapper,
- StyledControlWrapper,
- RestoreWrapper
-} from './style'
-import RestoreSites from '../restoreSites'
-import { Tab } from '../'
-import Modal from '../../../components/popupModals/modal/index'
-import TableContribute, { DetailRow } from '../tableContribute/index'
-import { getLocale } from '../../../helpers'
-
-export interface Props {
- rows: DetailRow[]
- excludedRows?: DetailRow[]
- onClose: () => void
- onRestore: () => void
- id?: string
- activeTabId?: number
- onTabChange?: () => void
-}
-
-export default class ModalContribute extends React.PureComponent {
-
- get headers () {
- return [
- getLocale('site'),
- getLocale('rewardsContributeAttention')
- ]
- }
-
- getTabTitle = (key: string, numSites?: number) => {
- if (numSites === undefined) {
- return `${getLocale(key)}`
- }
-
- return `${getLocale(key)} (${numSites})`
- }
-
- getACTable = () => {
- const { rows } = this.props
- const numSites = rows && rows.length || 0
-
- return (
- <>
-
- {getLocale('rewardsContributeText1')} {numSites} {getLocale('sites')}.
-
-
- >
- )
- }
-
- getExcludedTable = () => {
- const { excludedRows, onRestore } = this.props
- const numExcludedSites = excludedRows && excludedRows.length || 0
-
- return (
- <>
-
- {getLocale('rewardsExcludedText1')} {numExcludedSites} {getLocale('rewardsExcludedText2')}
-
- {
- numExcludedSites > 0
- ?
-
-
- : null
- }
-
- >
- )
- }
-
- render () {
- const {
- id,
- onClose,
- rows,
- excludedRows,
- activeTabId,
- onTabChange
- } = this.props
- const numSites = rows && rows.length || 0
- const numExcluded = excludedRows && excludedRows.length || 0
-
- return (
-
-
-
-
- {getLocale('rewardsContribute')}
-
-
-
-
-
- {
- activeTabId === 0
- ? this.getACTable()
- : this.getExcludedTable()
- }
-
-
- )
- }
-}
diff --git a/src/features/rewards/modalContribute/spec.tsx b/src/features/rewards/modalContribute/spec.tsx
deleted file mode 100644
index 38fbd40df..000000000
--- a/src/features/rewards/modalContribute/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import ModalContribute from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('ModalContribute tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#modal').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/modalContribute/style.ts b/src/features/rewards/modalContribute/style.ts
deleted file mode 100644
index 646755751..000000000
--- a/src/features/rewards/modalContribute/style.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-
-export const StyledWrapper = styled<{}, 'div'>('div')`
- font-family: Poppins, sans-serif;
-`
-
-export const StyledTitle = styled<{}, 'div'>('div')`
- font-size: 16px;
- font-weight: 600;
- line-height: 2;
- color: #4b4c5c;
- margin-bottom: 20px;
-`
-
-export const StyledContent = styled<{}, 'div'>('div')`
- font-size: 16px;
- color: #4b4c5c;
- margin: 30px 0px 20px;
-`
-
-export const StyledNum = styled<{}, 'span'>('span')`
- font-weight: 500;
- color: #0c0d21;
-`
-
-export const StyledTabWrapper = styled<{}, 'div'>('div')`
- margin: 0 auto 30px;
-`
-
-export const StyledControlWrapper = styled<{}, 'div'>('div')`
- width: 100%;
- margin-bottom: 30px;
-`
-
-export const RestoreWrapper = styled<{}, 'div'>('div')`
- float: right;
- margin: -18px 0 -10px;
-`
diff --git a/src/features/rewards/modalDonation/__snapshots__/spec.tsx.snap b/src/features/rewards/modalDonation/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 05b31445b..000000000
--- a/src/features/rewards/modalDonation/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,176 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`ModalDonation tests basic tests matches the snapshot 1`] = `
-.c5 {
- font-family: Poppins,sans-serif;
-}
-
-.c6 {
- font-size: 20px;
- font-weight: 600;
- line-height: 2;
- color: #4b4c5c;
- margin-bottom: 20px;
-}
-
-.c0 {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100vh;
- background: rgba(12,13,33,0.85);
- z-index: 99;
- padding: 0 20px;
- overflow: hidden;
-}
-
-.c1 {
- max-width: 920px;
- margin: 52px auto;
- background: #fff;
- border-radius: 6px;
- overflow: hidden;
- position: relative;
-}
-
-.c2 {
- position: absolute;
- top: 20px;
- right: 20px;
- cursor: pointer;
- width: 20px;
- height: 20px;
- color: #9E9FAB;
-}
-
-.c4 {
- padding: 48px 48px;
- overflow-y: auto;
- max-height: calc(100vh - 100px);
-}
-
-.c3 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-.c10 {
- text-align: center;
- padding: 30px 0;
- color: #999ea2;
- font-size: 14px;
-}
-
-.c7 {
- min-width: 100%;
- margin: 24px 0;
-}
-
-.c8 {
- text-transform: uppercase;
- text-align: left;
- font-family: Muli,sans-serif;
- font-size: 12px;
- font-weight: 500;
- border-bottom: 2px solid #dedfe4;
- border-top: 2px solid #dedfe4;
- color: #4B4C5C;
- padding: 12px 0;
- border: none;
- border-bottom: 1px solid #696FDC;
- padding: 8px 0;
- color: #696FDC;
-}
-
-.c9 {
- text-transform: uppercase;
- text-align: left;
- font-family: Muli,sans-serif;
- font-size: 12px;
- font-weight: 500;
- border-bottom: 2px solid #dedfe4;
- border-top: 2px solid #dedfe4;
- color: #4B4C5C;
- padding: 12px 0;
- text-align: right;
- padding-right: 7px;
- border: none;
- border-bottom: 1px solid #696FDC;
- padding: 8px 0;
- color: #696FDC;
-}
-
-
-
-
-
-
-
- MISSING: donationTips
-
-
-
-
-
-
-
- MISSING: site
- |
-
- MISSING: type
- |
-
- MISSING: tokens
- |
-
-
-
-
-
-
-
-
-
-
-`;
diff --git a/src/features/rewards/modalDonation/index.tsx b/src/features/rewards/modalDonation/index.tsx
deleted file mode 100644
index 282608170..000000000
--- a/src/features/rewards/modalDonation/index.tsx
+++ /dev/null
@@ -1,39 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledWrapper,
- StyledTitle
-} from './style'
-import Modal from '../../../components/popupModals/modal/index'
-import TableDonation, { DetailRow } from '../tableDonation/index'
-import { getLocale } from '../../../helpers'
-
-export interface Props {
- rows: DetailRow[]
- onClose: () => void
- id?: string
-}
-
-export default class ModalDonation extends React.PureComponent {
- render () {
- const { id, onClose, rows } = this.props
- const numRows = rows && rows.length || 0
-
- return (
-
-
- {getLocale('donationTips')}
-
-
-
- )
- }
-}
diff --git a/src/features/rewards/modalDonation/spec.tsx b/src/features/rewards/modalDonation/spec.tsx
deleted file mode 100644
index 4e687d502..000000000
--- a/src/features/rewards/modalDonation/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import ModalDonation from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('ModalDonation tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#modal').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/modalDonation/style.ts b/src/features/rewards/modalDonation/style.ts
deleted file mode 100644
index 62fed2e3c..000000000
--- a/src/features/rewards/modalDonation/style.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-
-export const StyledWrapper = styled<{}, 'div'>('div')`
- font-family: Poppins, sans-serif;
-`
-
-export const StyledTitle = styled<{}, 'div'>('div')`
- font-size: 20px;
- font-weight: 600;
- line-height: 2;
- color: #4b4c5c;
- margin-bottom: 20px;
-`
diff --git a/src/features/rewards/modalPending/__snapshots__/spec.tsx.snap b/src/features/rewards/modalPending/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 0f1917867..000000000
--- a/src/features/rewards/modalPending/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,210 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`ModalPending tests basic tests matches the snapshot 1`] = `
-.c5 {
- font-family: Poppins,sans-serif;
-}
-
-.c6 {
- font-size: 20px;
- font-weight: 600;
- line-height: 2;
- color: #4b4c5c;
- margin-bottom: 20px;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
-}
-
-.c0 {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100vh;
- background: rgba(12,13,33,0.85);
- z-index: 99;
- padding: 0 20px;
- overflow: hidden;
-}
-
-.c1 {
- max-width: 920px;
- margin: 52px auto;
- background: #fff;
- border-radius: 6px;
- overflow: hidden;
- position: relative;
-}
-
-.c2 {
- position: absolute;
- top: 20px;
- right: 20px;
- cursor: pointer;
- width: 20px;
- height: 20px;
- color: #9E9FAB;
-}
-
-.c4 {
- padding: 48px 48px;
- overflow-y: auto;
- max-height: calc(100vh - 100px);
-}
-
-.c3 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-.c11 {
- text-align: center;
- padding: 30px 0;
- color: #999ea2;
- font-size: 14px;
-}
-
-.c7 {
- min-width: 100%;
- margin: 24px 0;
-}
-
-.c8 {
- text-transform: uppercase;
- text-align: left;
- font-family: Muli,sans-serif;
- font-size: 12px;
- font-weight: 500;
- border-bottom: 2px solid #dedfe4;
- border-top: 2px solid #dedfe4;
- color: #4B4C5C;
- padding: 12px 0;
- border: none;
- border-bottom: 1px solid #696FDC;
- padding: 0;
- color: #696FDC;
-}
-
-.c9 {
- text-transform: uppercase;
- text-align: left;
- font-family: Muli,sans-serif;
- font-size: 12px;
- font-weight: 500;
- border-bottom: 2px solid #dedfe4;
- border-top: 2px solid #dedfe4;
- color: #4B4C5C;
- padding: 12px 0;
- border: none;
- border-bottom: 1px solid #696FDC;
- padding: 0;
- color: #696FDC;
- text-align: right;
-}
-
-.c10 {
- text-transform: uppercase;
- text-align: left;
- font-family: Muli,sans-serif;
- font-size: 12px;
- font-weight: 500;
- border-bottom: 2px solid #dedfe4;
- border-top: 2px solid #dedfe4;
- color: #4B4C5C;
- padding: 12px 0;
- border: none;
- border-bottom: 1px solid #696FDC;
- padding: 0 10px;
- color: #696FDC;
- text-align: center;
-}
-
-
-
-
-
-
-
- MISSING: pendingContributions
-
-
-
-
-
-
-
- MISSING: site
- |
-
- MISSING: type
- |
-
- MISSING: pendingUntil
- |
-
- MISSING: amount
- |
-
- MISSING: remove
- |
-
-
-
-
- MISSING: pendingContributionEmpty
-
-
-
-
-
-
-
-`;
diff --git a/src/features/rewards/modalPending/index.tsx b/src/features/rewards/modalPending/index.tsx
deleted file mode 100644
index 6f1ffd8d2..000000000
--- a/src/features/rewards/modalPending/index.tsx
+++ /dev/null
@@ -1,48 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledWrapper,
- StyledTitle,
- StyledRemoveAll
-} from './style'
-import Modal from '../../../components/popupModals/modal/index'
-import TablePending, { DetailRow } from '../tablePending/index'
-import { getLocale } from '../../../helpers'
-
-export interface Props {
- rows: DetailRow[]
- onClose: () => void
- onRemoveAll?: () => void
- id?: string
-}
-
-export default class ModalPending extends React.PureComponent {
- render () {
- const { id, onClose, rows, onRemoveAll } = this.props
-
- return (
-
-
-
- {getLocale('pendingContributions')}
- {
- onRemoveAll
- ?
- {getLocale('pendingContributionRemoveAll')}
-
- : null
- }
-
-
-
-
- )
- }
-}
diff --git a/src/features/rewards/modalPending/spec.tsx b/src/features/rewards/modalPending/spec.tsx
deleted file mode 100644
index 2658e10ee..000000000
--- a/src/features/rewards/modalPending/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import ModalPending from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('ModalPending tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#modal').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/modalPending/style.ts b/src/features/rewards/modalPending/style.ts
deleted file mode 100644
index 2144386d3..000000000
--- a/src/features/rewards/modalPending/style.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-
-export const StyledWrapper = styled<{}, 'div'>('div')`
- font-family: Poppins, sans-serif;
-`
-
-export const StyledTitle = styled<{}, 'div'>('div')`
- font-size: 20px;
- font-weight: 600;
- line-height: 2;
- color: #4b4c5c;
- margin-bottom: 20px;
- display: flex;
-`
-export const StyledRemoveAll = styled<{}, 'button'>('button')`
- display: inline-block;
- border: none;
- background: none;
- color: #696fdc;
- font-size: 13px;
- font-weight: normal;
- cursor: pointer;
- margin: 6px 5px 0 0;
-`
diff --git a/src/features/rewards/modalRedirect/__snapshots__/spec.tsx.snap b/src/features/rewards/modalRedirect/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 84278ed9a..000000000
--- a/src/features/rewards/modalRedirect/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,103 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`ModalRedirect tests basic tests matches the snapshot 1`] = `
-.c3 {
- font-family: Poppins,sans-serif;
-}
-
-.c4 {
- font-size: 20px;
- font-weight: 600;
- line-height: 2;
- color: #3b3e4f;
- margin-bottom: 20px;
- text-align: center;
-}
-
-.c5 {
- margin: 0 auto;
- width: 30px;
- height: 30px;
-}
-
-.c0 {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100vh;
- background: rgba(12,13,33,0.85);
- z-index: 99;
- padding: 0 20px;
- overflow: hidden;
-}
-
-.c1 {
- max-width: 920px;
- margin: 52px auto;
- background: #fff;
- border-radius: 6px;
- overflow: hidden;
- position: relative;
-}
-
-.c2 {
- padding: 48px 48px;
- overflow-y: auto;
- max-height: calc(100vh - 100px);
-}
-
-.c6 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-
-`;
diff --git a/src/features/rewards/modalRedirect/index.tsx b/src/features/rewards/modalRedirect/index.tsx
deleted file mode 100644
index d733c3c7e..000000000
--- a/src/features/rewards/modalRedirect/index.tsx
+++ /dev/null
@@ -1,66 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledWrapper,
- StyledTitle,
- StyledLoader,
- StyledError,
- StyledButton
-} from './style'
-import Modal from '../../../components/popupModals/modal/index'
-import { LoaderIcon } from '../../../components/icons'
-import { Button } from '../../../components'
-
-export interface Props {
- id?: string
- errorText?: {
- __html: string;
- }
- buttonText?: string
- titleText?: string
- onClick?: () => void
-}
-
-export default class ModalRedirect extends React.PureComponent {
-
- getButton = () => {
- const { onClick, buttonText } = this.props
- if (!onClick || !buttonText) {
- return null
- }
-
- return (
-
-
-
- )
- }
-
- render () {
- const { id, errorText, titleText } = this.props
-
- return (
-
-
-
- {titleText}
-
- {
- errorText
- ?
-
- {this.getButton()}
-
- :
-
-
- }
-
-
-
- )
- }
-}
diff --git a/src/features/rewards/modalRedirect/spec.tsx b/src/features/rewards/modalRedirect/spec.tsx
deleted file mode 100644
index 4867100a2..000000000
--- a/src/features/rewards/modalRedirect/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import ModalRedirect from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('ModalRedirect tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#modal').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/modalRedirect/style.ts b/src/features/rewards/modalRedirect/style.ts
deleted file mode 100644
index c7ebdcc83..000000000
--- a/src/features/rewards/modalRedirect/style.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-
-export const StyledWrapper = styled<{}, 'div'>('div')`
- font-family: ${p => p.theme.fontFamily.heading};
-`
-
-export const StyledTitle = styled<{}, 'div'>('div')`
- font-size: 20px;
- font-weight: 600;
- line-height: 2;
- color: ${p => p.theme.palette.grey800};
- margin-bottom: 20px;
- text-align: center;
-`
-
-export const StyledLoader = styled<{}, 'div'>('div')`
- margin: 0 auto;
- width: 30px;
- height: 30px;
-`
-
-export const StyledError = styled<{}, 'div'>('div')`
- text-align: center;
-
- a {
- color: ${p => p.theme.palette.blurple500};
- text-decoration: none;
-
- :hover {
- text-decoration: underline;
- }
- }
-`
-
-export const StyledButton = styled<{}, 'div'>('div')`
- display: flex;
- margin-top: 20px;
- flex-direction: column;
- align-items: center;
-`
diff --git a/src/features/rewards/modalShowAdsHistory/__snapshots__/spec.tsx.snap b/src/features/rewards/modalShowAdsHistory/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 8b7a944d4..000000000
--- a/src/features/rewards/modalShowAdsHistory/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,181 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`ModalShowAdsHistory tests basic tests matches the snapshot 1`] = `
-.c5 {
- font-family: Poppins,sans-serif;
- padding-top: 10px;
- white-space: nowrap;
-}
-
-.c6 {
- font-size: 22px;
- font-weight: 600;
- color: #a3278f;
- margin-bottom: 10px;
- line-height: 1.3;
-}
-
-.c7 {
- font-size: 30px;
- line-height: 1.2;
- margin-bottom: 10px;
- font-weight: 300;
-}
-
-.c10 {
- font-size: 18px;
- color: #a3278f;
- margin-right: 5px;
-}
-
-.c9 {
- line-height: 1.5;
-}
-
-.c11 {
- font-size: 18px;
- color: #a3278f;
- font-weight: 600;
-}
-
-.c8 {
- line-height: 1.5;
- width: 100%;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-box-pack: justify;
- -webkit-justify-content: space-between;
- -ms-flex-pack: justify;
- justify-content: space-between;
- -webkit-align-items: baseline;
- -webkit-box-align: baseline;
- -ms-flex-align: baseline;
- align-items: baseline;
-}
-
-.c0 {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100vh;
- background: rgba(12,13,33,0.85);
- z-index: 99;
- padding: 0 20px;
- overflow: hidden;
-}
-
-.c1 {
- max-width: 920px;
- margin: 52px auto;
- background: #fff;
- border-radius: 6px;
- overflow: hidden;
- position: relative;
-}
-
-.c2 {
- position: absolute;
- top: 20px;
- right: 20px;
- cursor: pointer;
- width: 20px;
- height: 20px;
- color: #9E9FAB;
-}
-
-.c4 {
- padding: 48px 48px;
- overflow-y: auto;
- max-height: calc(100vh - 100px);
-}
-
-.c3 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-.c12 {
- -webkit-text-decoration: none;
- text-decoration: none;
- font-size: 16px;
- font-weight: 400;
- padding-top: 24px;
-}
-
-
-
-
-
-
-
- MISSING: adsHistoryTitle
-
-
- MISSING: adsHistorySubTitle
-
-
-
-
- MISSING: adsCurrentlyViewing
-
-
- 0
-
-
-
-
-
- MISSING: noAdsHistory
-
-
-
-
-
-
-`;
diff --git a/src/features/rewards/modalShowAdsHistory/index.tsx b/src/features/rewards/modalShowAdsHistory/index.tsx
deleted file mode 100644
index 45ec36357..000000000
--- a/src/features/rewards/modalShowAdsHistory/index.tsx
+++ /dev/null
@@ -1,169 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledAdsHeaderWrapper,
- StyledAdsHistoryTitle,
- StyledAdsInfoText,
- StyledAdsInfoTextWrapper,
- StyledAdsPerHourText,
- StyledAdsSaveFiltered,
- StyledNotSelectedLink,
- StyledLink,
- StyledSeparatorText,
- StyledSubTitleText,
- StyledText,
- StyledThumbDownFilter,
- StyledThumbDownNotSelectedFilter,
- StyledWrapper
-} from './style'
-import Modal from '../../../components/popupModals/modal/index'
-import { getLocale } from '../../../helpers'
-import TableAdsHistory, { DetailRow } from '../tableAdsHistory/index'
-import { ThumbsupSIcon } from '../../../components/icons'
-
-export interface Props {
- rows?: DetailRow[]
- onClose?: () => void
- id?: string
- adsPerHour?: number
- totalDays?: number
- hasSavedEntries?: boolean
- onSavedFilterClick?: () => void
- onAllFilterClick?: () => void
- onThumbFilterClick?: () => void
-}
-
-interface State {
- filterStatus: number
-}
-
-export default class ModalShowAdsHistory extends React.PureComponent {
- constructor (props: Props) {
- super(props)
- this.state = {
- filterStatus: 0
- }
- }
-
- get headers () {
- return [
- getLocale('date'),
- getLocale('ads'),
- getLocale('category')
- ]
- }
-
- onSavedFilterClick = () => {
- this.setState({
- filterStatus: 1
- })
- const savedFilterFn = this.props.onSavedFilterClick
- if (savedFilterFn) {
- savedFilterFn()
- }
- }
-
- onAllFilterClick = () => {
- this.setState({
- filterStatus: 0
- })
- const allFilterFn = this.props.onAllFilterClick
- if (allFilterFn) {
- allFilterFn()
- }
- }
-
- onThumbFilterClick = () => {
- this.setState({
- filterStatus: 2
- })
- const thumbFilterFn = this.props.onThumbFilterClick
- if (thumbFilterFn) {
- thumbFilterFn()
- }
- }
-
- render () {
- const { id, onClose, adsPerHour, hasSavedEntries, rows, totalDays } = this.props
-
- return (
-
-
-
- {getLocale('adsHistoryTitle')}
-
-
- {getLocale('adsHistorySubTitle', { totalDays: totalDays || '0' })}
-
-
-
-
- {getLocale('adsCurrentlyViewing')}
-
-
- {adsPerHour || '0'}
-
-
- {
- rows && hasSavedEntries ?
-
-
- {
- this.state.filterStatus !== 0 ?
-
- {
- getLocale('all')
- }
- :
-
- {
- getLocale('all')
- }
-
- }
-
- |
-
- {
- this.state.filterStatus !== 1 ?
-
- {
- getLocale('saved')
- }
- :
-
- {
- getLocale('saved')
- }
-
- }
-
- |
-
- {
- this.state.filterStatus !== 2 ?
-
-
- :
-
-
-
- }
-
-
- : null
- }
-
-
-
-
- )
- }
-}
diff --git a/src/features/rewards/modalShowAdsHistory/spec.tsx b/src/features/rewards/modalShowAdsHistory/spec.tsx
deleted file mode 100644
index c44bcac56..000000000
--- a/src/features/rewards/modalShowAdsHistory/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import ModalShowAdsHistory from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('ModalShowAdsHistory tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#modal').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/modalShowAdsHistory/style.ts b/src/features/rewards/modalShowAdsHistory/style.ts
deleted file mode 100644
index 211252279..000000000
--- a/src/features/rewards/modalShowAdsHistory/style.ts
+++ /dev/null
@@ -1,109 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this file,
-* You can obtain one at http://mozilla.org/MPL/2.0/.
-*/
-
-import styled from 'styled-components'
-
-export const StyledWrapper = styled<{}, 'div'>('div')`
- font-family: ${p => p.theme.fontFamily.heading};
- padding-top: 10px;
- white-space: nowrap;
-`
-
-export const StyledLink = styled<{}, 'a'>('a')`
- cursor: pointer;
- display: inline-block;
- color: ${p => p.theme.palette.grey300};
- font-size: 16px;
- letter-spacing: 0;
-`
-
-export const StyledNotSelectedLink = styled<{}, 'span'>('span')`
- display: inline-block;
- color: ${p => p.theme.color.brandBat};
- font-size: 16px;
- letter-spacing: 0;
-`
-
-export const StyledText = styled<{}, 'span'>('span')`
- font-size: 16px;
- letter-spacing: 0;
- display: inline-block;
- color: ${p => p.theme.color.text};
- margin: 0 10px 0;
-`
-
-export const StyledAdsHistoryTitle = styled<{}, 'div'>('div')`
- font-size: 22px;
- font-weight: 600;
- color: ${p => p.theme.palette.magenta600};
- margin-bottom: 10px;
- line-height: 1.3;
-`
-
-export const StyledSeparatorText = styled<{}, 'span'>('span')`
- font-size: 16px;
- font-weight: 200;
- letter-spacing: 0;
- display: inline-block;
- color: ${p => p.theme.color.text};
-`
-
-export const StyledSubTitleText = styled<{}, 'div'>('div')`
- font-size: 30px;
- line-height: 1.2;
- margin-bottom: 10px;
- font-weight: 300;
-`
-
-export const StyledAdsInfoText = styled<{}, 'span'>('span')`
- font-size: 18px;
- color: ${p => p.theme.palette.magenta600};
- margin-right: 5px;
-`
-
-export const StyledAdsInfoTextWrapper = styled<{}, 'div'>('div')`
- line-height: 1.5;
-`
-
-export const StyledAdsPerHourText = styled<{}, 'span'>('span')`
- font-size: 18px;
- color: ${p => p.theme.palette.magenta600};
- font-weight: 600;
-`
-
-export const StyledAdsHeaderWrapper = styled<{}, 'div'>('div')`
- line-height: 1.5;
- width: 100%;
- display: flex;
- justify-content: space-between;
- align-items: baseline;
-`
-
-export const StyledAdsSaveFiltered = styled<{}, 'div'>('div')`
- text-align: right;
- line-height: 1.5;
- display: flex;
- justify-content: space-between;
-`
-
-export const StyledThumbDownFilter = styled<{}, 'div'>('div')`
- display: inline-block;
- width: 32px;
- height: 32px;
- margin-top: auto;
- padding: 4px;
- padding-top: 0px;
- cursor: pointer;
- color: ${p => p.theme.color.subtle};
-`
-
-export const StyledThumbDownNotSelectedFilter = styled<{}, 'div'>('div')`
- display: inline-block;
- width: 32px;
- height: 32px;
- color: ${p => p.theme.color.brandBat};
- padding: 4px;
- padding-top: 0px;
-`
diff --git a/src/features/rewards/modalVerify/__snapshots__/spec.tsx.snap b/src/features/rewards/modalVerify/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 44030be7a..000000000
--- a/src/features/rewards/modalVerify/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,562 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`PanelVerify tests basic tests matches the snapshot 1`] = `
-.c12 {
- box-sizing: border-box;
- font-family: Poppins,sans-serif;
- font-weight: 400;
- -webkit-font-smoothing: antialiased;
- margin: 0;
-}
-
-.c11 {
- font-size: 48px;
-}
-
-.c15 {
- box-sizing: border-box;
- font-family: Poppins,sans-serif;
- font-weight: 400;
- -webkit-font-smoothing: antialiased;
- margin: 0;
-}
-
-.c14 {
- font-size: 40px;
-}
-
-.c26 {
- --button-main-color: #FB542B;
- --button-main-color-hover: #FB542B;
- --button-main-color-active: #ffb8a6;
- --button-state-color: var(--button-main-color);
- --icon-size: 18px;
- --icon-spacing: 6px;
- --webkit-appearance: none;
- box-sizing: border-box;
- background: none;
- border: none;
- outline-color: transparent;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-flex-direction: row-reverse;
- -ms-flex-direction: row-reverse;
- flex-direction: row-reverse;
- -webkit-box-pack: center;
- -webkit-justify-content: center;
- -ms-flex-pack: center;
- justify-content: center;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- font-family: Poppins,sans-serif;
- cursor: pointer;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- font-size: 14px;
- border-radius: 28px;
- width: 100%;
- min-width: 235px;
- padding: 19px 15px;
-}
-
-.c26:hover:enabled {
- --button-state-color: var(--button-main-color-hover);
-}
-
-.c26:active:enabled {
- --button-state-color: var(--button-main-color-active);
-}
-
-.c25 {
- color: #fff;
- background: var(--button-state-color);
- border: 1px solid var(--button-state-color);
-}
-
-.c27 {
- min-height: var(--icon-size);
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- text-align: center;
- -webkit-letter-spacing: 0;
- -moz-letter-spacing: 0;
- -ms-letter-spacing: 0;
- letter-spacing: 0;
- font-weight: 500;
- text-transform: uppercase;
- line-height: 1;
-}
-
-.c3 {
- font-family: Poppins,sans-serif;
- background-image: linear-gradient(180deg,#4C54D2 0%,#563195 100%);
- padding: 42px 42px 30px;
- margin: -48px;
- position: relative;
-}
-
-.c4 {
- position: absolute;
- top: 20px;
- right: 20px;
- cursor: pointer;
- width: 15px;
- height: 15px;
- color: #FFFFFF;
-}
-
-.c6 {
- margin-bottom: 40px;
- padding-left: 26px;
-}
-
-.c7 {
- display: inline-block;
- vertical-align: middle;
- width: 50px;
- height: 50px;
-}
-
-.c9 {
- vertical-align: middle;
- display: inline-block;
- padding-left: 22px;
-}
-
-.c10 {
- color: #FFFFFF;
- font-size: 22px;
- line-height: 24px;
- font-weight: 600;
-}
-
-.c13 {
- color: #FFFFFF;
- font-family: Muli,sans-serif;
- font-size: 14px;
- line-height: 24px;
-}
-
-.c16 {
- font-weight: 600;
- font-size: 17px;
- line-height: 25px;
- padding: 0 0 0 36px;
- color: #FFFFFF;
- margin-bottom: -7px;
-}
-
-.c19 {
- color: hsla(0,0%,100%,0.85);
- margin: 17px 0;
-}
-
-.c20 {
- display: inline-block;
- width: 24px;
- height: 24px;
- vertical-align: top;
-}
-
-.c22 {
- vertical-align: middle;
- font-family: Muli,sans-serif;
- font-size: 15px;
- line-height: 20px;
- display: inline-block;
- width: calc(100% - 30px);
- padding-left: 12px;
-}
-
-.c24 {
- padding: 11px 40px;
- width: auto;
- min-height: auto;
- margin-top: -20px;
-}
-
-.c28 {
- font-family: Muli,sans-serif;
- font-size: 12px;
- color: hsla(0,0%,100%,0.7);
- margin-top: 32px;
-}
-
-.c29 {
- display: inline-block;
- vertical-align: middle;
- width: 20px;
- height: 20px;
-}
-
-.c17 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- margin-bottom: 10px;
-}
-
-.c18 {
- width: 50%;
- padding-right: 10px;
-}
-
-.c23 {
- width: 50%;
- padding-left: 40px;
-}
-
-.c31 {
- font-family: Muli,sans-serif;
- font-size: 12px;
- line-height: 20px;
- color: hsla(0,0%,100%,0.7);
- margin-top: 15px;
-}
-
-.c5 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-.c21 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-.c8 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-.c30 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-.c0 {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100vh;
- background: rgba(12,13,33,0.85);
- z-index: 99;
- padding: 0 20px;
- overflow: hidden;
-}
-
-.c1 {
- max-width: 666px;
- margin: 52px auto;
- background: #fff;
- border-radius: 6px;
- overflow: hidden;
- position: relative;
-}
-
-.c2 {
- padding: 48px 48px;
- overflow-y: auto;
- max-height: calc(100vh - 100px);
-}
-
-
-
-
-
-
-
-
-
-
-
-
- MISSING: walletVerificationTitle1
-
-
- MISSING: walletVerificationTitle2
-
-
-
-
- MISSING: walletVerificationListHeader
-
-
-
-
-
-
- MISSING: walletVerificationList1
-
-
-
-
-
- MISSING: walletVerificationList2
-
-
-
-
-
- MISSING: walletVerificationList3
-
-
-
-
-
-
- MISSING: walletVerificationFooter
-
-
- Uphold
-
-
-
-
- MISSING: walletVerificationNote1
-
-
- MISSING: walletVerificationNote2
-
-
-
-
-
-
-
-`;
diff --git a/src/features/rewards/modalVerify/index.tsx b/src/features/rewards/modalVerify/index.tsx
deleted file mode 100644
index 4fc7dd81d..000000000
--- a/src/features/rewards/modalVerify/index.tsx
+++ /dev/null
@@ -1,124 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import { getLocale } from '../../../helpers'
-
-import {
- StyledWrapper,
- StyledClose,
- StyledHeader,
- StyledWalletIcon,
- StyledHeaderText,
- StyledTitle,
- StyledSubtitle,
- StyledListTitle,
- StyledListItem,
- StyledListIcon,
- StyledListItemText,
- StyledButton,
- StyledFooter,
- StyledFooterIcon,
- StyledLeftSide,
- StyledRightSide,
- StyledContent,
- StyledNote
-} from './style'
-
-import {
- CloseStrokeIcon,
- UpholdColorIcon,
- RewardsWalletCheck,
- RewardsCheckIcon
-} from '../../../components/icons'
-import { Modal } from '../../../components'
-
-export interface Props {
- onVerifyClick: () => void
- onClose: () => void
- id?: string
-}
-
-export default class ModalVerify extends React.PureComponent {
- getListItem = (text: string) => (
-
-
-
-
-
- {text}
-
-
- )
-
- getHeader = (onClose: () => void) => (
- <>
-
-
-
-
-
-
-
-
-
- {getLocale('walletVerificationTitle1')}
-
-
- {getLocale('walletVerificationTitle2')}
-
-
-
- >
- )
-
- getFooter = () => (
-
- {getLocale('walletVerificationFooter')} Uphold
-
-
-
-
- )
-
- render () {
- const {
- onVerifyClick,
- onClose,
- id
- } = this.props
-
- return (
-
-
- {this.getHeader(onClose)}
-
- {getLocale('walletVerificationListHeader')}
-
-
-
- {this.getListItem(getLocale('walletVerificationList1'))}
- {this.getListItem(getLocale('walletVerificationList2'))}
- {this.getListItem(getLocale('walletVerificationList3'))}
-
-
-
- {this.getFooter()}
-
- {getLocale('walletVerificationNote1')}
- {getLocale('walletVerificationNote2')}
-
-
-
-
-
- )
- }
-}
diff --git a/src/features/rewards/modalVerify/spec.tsx b/src/features/rewards/modalVerify/spec.tsx
deleted file mode 100644
index 396eab30d..000000000
--- a/src/features/rewards/modalVerify/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import PanelVerify from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('PanelVerify tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#panel-verify').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/modalVerify/style.ts b/src/features/rewards/modalVerify/style.ts
deleted file mode 100644
index aaf909294..000000000
--- a/src/features/rewards/modalVerify/style.ts
+++ /dev/null
@@ -1,137 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-import Heading from '../../../components/text/heading'
-import Button, { Props as ButtonProps } from '../../../components/buttonsIndicators/button'
-import { ComponentType } from 'react'
-
-interface StyleProps {
- compact?: boolean
-}
-
-export const StyledWrapper = styled<{}, 'div'>('div')`
- font-family: ${p => p.theme.fontFamily.heading};
- background-image: linear-gradient(180deg, ${p => p.theme.palette.blurple500} 0%, #563195 100%);
- padding: 42px 42px 30px;
- margin: -48px;
- position: relative;
-`
-
-export const StyledClose = styled<{}, 'div'>('div')`
- position: absolute;
- top: 20px;
- right: 20px;
- cursor: pointer;
- width: 15px;
- height: 15px;
- color: ${p => p.theme.palette.white};
-`
-
-export const StyledHeader = styled('div')`
- margin-bottom: 40px;
- padding-left: 26px;
-`
-
-export const StyledWalletIcon = styled<{}, 'div'>('div')`
- display: inline-block;
- vertical-align: middle;
- width: 50px;
- height: 50px;
-`
-
-export const StyledHeaderText = styled<{}, 'div'>('div')`
- vertical-align: middle;
- display: inline-block;
- padding-left: 22px;
-`
-
-export const StyledTitle = styled(Heading)`
- color: ${p => p.theme.palette.white};
- font-size: 22px;
- line-height: 24px;
- font-weight: 600;
-`
-
-export const StyledSubtitle = styled(Heading)`
- color: ${p => p.theme.palette.white};
- font-family: ${p => p.theme.fontFamily.body};
- font-size: 14px;
- line-height: 24px;
-`
-
-export const StyledListTitle = styled(Heading)`
- font-weight: 600;
- font-size: 17px;
- line-height: 25px;
- padding: 0 0 0 36px;
- color: ${p => p.theme.palette.white};
- margin-bottom: -7px;
-`
-
-export const StyledListItem = styled('div')`
- color: ${p => p.theme.palette.whiteFade15};
- margin: 17px 0;
-`
-
-export const StyledListIcon = styled<{}, 'div'>('div')`
- display: inline-block;
- width: 24px;
- height: 24px;
- vertical-align: top;
-`
-
-export const StyledListItemText = styled<{}, 'div'>('div')`
- vertical-align: middle;
- font-family: ${p => p.theme.fontFamily.body};
- font-size: 15px;
- line-height: 20px;
- display: inline-block;
- width: calc(100% - 30px);
- padding-left: 12px;
-`
-
-export const StyledButton = styled(Button as ComponentType)`
- padding: 11px 40px;
- width: auto;
- min-height: auto;
- margin-top: -20px;
-`
-
-export const StyledFooter = styled('div')`
- font-family: ${p => p.theme.fontFamily.body};
- font-size: 12px;
- color: ${p => p.theme.palette.whiteFade30};
- margin-top: 32px;
-`
-
-export const StyledFooterIcon = styled<{}, 'div'>('div')`
- display: inline-block;
- vertical-align: middle;
- width: 20px;
- height: 20px;
-`
-
-export const StyledContent = styled<{}, 'div'>('div')`
- display: flex;
- margin-bottom: 10px;
-`
-
-export const StyledLeftSide = styled<{}, 'div'>('div')`
- width: 50%;
- padding-right: 10px;
-`
-
-export const StyledRightSide = styled<{}, 'div'>('div')`
- width: 50%;
- padding-left: 40px;
-`
-
-export const StyledNote = styled<{}, 'div'>('div')`
- font-family: ${p => p.theme.fontFamily.body};
- font-size: 12px;
- line-height: 20px;
- color: ${p => p.theme.palette.whiteFade30};
- margin-top: 15px;
-`
diff --git a/src/features/rewards/nextContribution/__snapshots__/spec.tsx.snap b/src/features/rewards/nextContribution/__snapshots__/spec.tsx.snap
deleted file mode 100644
index e1388a158..000000000
--- a/src/features/rewards/nextContribution/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,18 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`NextContribution tests basic tests matches the snapshot 1`] = `
-.c0 {
- font-size: 14px;
- text-align: right;
- border-radius: 6px;
- color: #4b4c5c;
- background: #e9f0ff;
- display: inline-block;
- padding: 9px 10px 9px 13px;
-}
-
-
-`;
diff --git a/src/features/rewards/nextContribution/index.tsx b/src/features/rewards/nextContribution/index.tsx
deleted file mode 100644
index 4f100eb8a..000000000
--- a/src/features/rewards/nextContribution/index.tsx
+++ /dev/null
@@ -1,23 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import { StyledWrapper } from './style'
-
-export interface Props {
- id?: string
- children?: React.ReactNode
-}
-
-export default class NextContribution extends React.PureComponent {
- render () {
- const { id, children } = this.props
-
- return (
-
- {children}
-
- )
- }
-}
diff --git a/src/features/rewards/nextContribution/spec.tsx b/src/features/rewards/nextContribution/spec.tsx
deleted file mode 100644
index 3d9149e6e..000000000
--- a/src/features/rewards/nextContribution/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import NextContribution from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('NextContribution tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#next').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/nextContribution/style.ts b/src/features/rewards/nextContribution/style.ts
deleted file mode 100644
index e36d49286..000000000
--- a/src/features/rewards/nextContribution/style.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-
-export const StyledWrapper = styled<{}, 'div'>('div')`
- font-size: 14px;
- text-align: right;
- border-radius: 6px;
- color: #4b4c5c;
- background: #e9f0ff;
- display: inline-block;
- padding: 9px 10px 9px 13px;
-`
diff --git a/src/features/rewards/panelWelcome/__snapshots__/spec.tsx.snap b/src/features/rewards/panelWelcome/__snapshots__/spec.tsx.snap
deleted file mode 100644
index a45189802..000000000
--- a/src/features/rewards/panelWelcome/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,268 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`PanelWelcome tests basic tests matches the snapshot 1`] = `
-.c7 {
- box-sizing: border-box;
- font-family: Poppins,sans-serif;
- font-weight: 400;
- -webkit-font-smoothing: antialiased;
- margin: 0;
-}
-
-.c6 {
- font-size: 24px;
-}
-
-.c12 {
- --button-main-color: #c2c4cf;
- --button-main-color-hover: #AEB1C2;
- --button-main-color-active: #84889c;
- --button-state-color: var(--button-main-color);
- --icon-size: 18px;
- --icon-spacing: 6px;
- --webkit-appearance: none;
- box-sizing: border-box;
- background: none;
- border: none;
- outline-color: transparent;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-flex-direction: row-reverse;
- -ms-flex-direction: row-reverse;
- flex-direction: row-reverse;
- -webkit-box-pack: center;
- -webkit-justify-content: center;
- -ms-flex-pack: center;
- justify-content: center;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- font-family: Poppins,sans-serif;
- cursor: pointer;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- font-size: 14px;
- border-radius: 28px;
- width: 100%;
- min-width: 235px;
- padding: 19px 15px;
-}
-
-.c12:hover:enabled {
- --button-state-color: var(--button-main-color-hover);
-}
-
-.c12:active:enabled {
- --button-state-color: var(--button-main-color-active);
-}
-
-.c11 {
- border: 1px solid;
- color: var(--button-state-color);
-}
-
-.c13 {
- min-height: var(--icon-size);
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- text-align: center;
- -webkit-letter-spacing: 0;
- -moz-letter-spacing: 0;
- -ms-letter-spacing: 0;
- letter-spacing: 0;
- font-weight: 500;
- text-transform: uppercase;
- line-height: 1;
-}
-
-.c0 {
- text-align: center;
- font-family: Poppins,sans-serif;
- background-image: linear-gradient(140deg,#392DD1 0%,#8E2995 100%);
-}
-
-.c1 {
- margin: 0 auto;
- display: inline-block;
- padding: 35px 30px 25px;
- background: url(test-file-stub) no-repeat top;
-}
-
-.c2 {
- width: 261px;
- color: #FFFFFF;
- font-size: 16px;
- font-weight: 300;
- -webkit-letter-spacing: 0.16px;
- -moz-letter-spacing: 0.16px;
- -ms-letter-spacing: 0.16px;
- letter-spacing: 0.16px;
- line-height: 22px;
- margin: 0 auto;
- opacity: 0.5;
- font-family: Muli,sans-serif;
-}
-
-.c3 {
- display: block;
- margin: -10px auto 2px;
- width: 150px;
- height: 115px;
- padding: 20px 0 15px;
-}
-
-.c5 {
- color: #FFFFFF;
- font-weight: 400;
- line-height: 22px;
- margin: 0;
- display: inline-block;
-}
-
-.c9 {
- color: #FFFFFF;
- font-size: 16px;
- font-weight: normal;
- -webkit-letter-spacing: 0;
- -moz-letter-spacing: 0;
- -ms-letter-spacing: 0;
- letter-spacing: 0;
- line-height: 24px;
- opacity: 0.5;
- margin: 15px auto 23px;
- text-align: center;
- width: 280px;
- font-family: Muli,sans-serif;
-}
-
-.c10 {
- color: #FFF;
- margin: 0 auto 24px;
- outline: 0;
-}
-
-.c10:hover {
- color: #e0e0e0;
-}
-
-.c14 {
- color: #73CBFF;
- font-size: 14px;
- font-weight: 500;
- -webkit-letter-spacing: -0.19px;
- -moz-letter-spacing: -0.19px;
- -ms-letter-spacing: -0.19px;
- letter-spacing: -0.19px;
- line-height: 21px;
- display: block;
- text-align: center;
- cursor: pointer;
- margin: 0 0 16px;
-}
-
-.c8 {
- display: inline-block;
- vertical-align: text-top;
- margin-top: -13px;
- color: #FFF;
- font-size: 9px;
- font-weight: 500;
- opacity: 0.7;
-}
-
-.c4 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-
-
-
- MISSING: welcomeHeaderOne
-
-
-
-
-
- MISSING: braveRewards
-
-
- TM
-
-
- MISSING: welcomeDescOne
-
-
-
- MISSING: welcomeFooterTextOne
-
-
-
-`;
diff --git a/src/features/rewards/panelWelcome/assets/batOutline.svg b/src/features/rewards/panelWelcome/assets/batOutline.svg
deleted file mode 100644
index b0495e798..000000000
--- a/src/features/rewards/panelWelcome/assets/batOutline.svg
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
diff --git a/src/features/rewards/panelWelcome/index.tsx b/src/features/rewards/panelWelcome/index.tsx
deleted file mode 100644
index fdc2f97ff..000000000
--- a/src/features/rewards/panelWelcome/index.tsx
+++ /dev/null
@@ -1,146 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import { getLocale } from '../../../helpers'
-
-import {
- StyledWrapper,
- StyledInnerWrapper,
- StyledHeaderText,
- StyledBatLogo,
- StyledTitle,
- StyledDescText,
- StyledFooterText,
- StyledTrademark,
- StyledErrorMessage,
- StyledJoinButton,
- StyledTOSWrapper,
- StyledServiceText,
- StyledServiceLink
-} from './style'
-
-import { BatColorIcon, LoaderIcon } from '../../../components/icons'
-
-export type Variant = 'one' | 'two'
-
-export interface Props {
- id?: string
- variant?: Variant
- creating?: boolean
- error?: boolean
- moreLink?: () => void
- optInAction: () => void
- optInErrorAction: () => void
- onTOSClick?: () => void
- onPrivacyClick?: () => void
-}
-
-export default class PanelWelcome extends React.PureComponent {
- get locale () {
- return {
- one: {
- header: 'welcomeHeaderOne',
- title: 'braveRewards',
- desc: 'welcomeDescOne',
- button: 'welcomeButtonTextOne',
- footer: 'welcomeFooterTextOne'
- },
- two: {
- header: 'welcomeHeaderTwo',
- title: 'braveRewards',
- desc: 'welcomeDescTwo',
- button: 'welcomeButtonTextTwo',
- footer: 'welcomeFooterTextTwo'
- }
- }[this.props.variant || 'one']
- }
-
- render () {
- const {
- id,
- optInAction,
- optInErrorAction,
- moreLink,
- onTOSClick,
- onPrivacyClick
- } = this.props
-
- let props = {}
-
- if (moreLink) {
- props = {
- onClick: moreLink
- }
- }
-
- return (
-
-
-
- {getLocale(this.locale.header)}
-
-
-
-
-
- {getLocale(this.locale.title)}
-
- TM
-
- {getLocale(this.locale.desc)}
-
- {
- this.props.creating && !this.props.error
- ? ,
- position: 'after'
- }}
- />
- : this.props.error
- ? <>
-
- {getLocale('walletFailedTitle')}
-
-
- >
- :
- }
- {
- onTOSClick && onPrivacyClick
- ?
-
- {getLocale('serviceTextPanelWelcome')} {getLocale('termsOfService')} {getLocale('and')} {getLocale('privacyPolicy')}.
-
-
- : null
- }
-
- {getLocale(this.locale.footer)}
-
-
-
- )
- }
-}
diff --git a/src/features/rewards/panelWelcome/spec.tsx b/src/features/rewards/panelWelcome/spec.tsx
deleted file mode 100644
index 268a21854..000000000
--- a/src/features/rewards/panelWelcome/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import PanelWelcome from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('PanelWelcome tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#panel-welcome').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/panelWelcome/style.ts b/src/features/rewards/panelWelcome/style.ts
deleted file mode 100644
index d9c37306e..000000000
--- a/src/features/rewards/panelWelcome/style.ts
+++ /dev/null
@@ -1,124 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-import Heading from '../../../components/text/heading'
-import batOutlineUrl from './assets/batOutline.svg'
-import Button, { Props as ButtonProps } from '../../../components/buttonsIndicators/button'
-import { ComponentType } from 'react'
-import palette from '../../../theme/colors'
-
-export const StyledWrapper = styled<{}, 'div'>('div')`
- text-align: center;
- font-family: Poppins, sans-serif;
- background-image: linear-gradient(140deg, #392DD1 0%, #8E2995 100%);
-` as any
-
-export const StyledInnerWrapper = styled<{}, 'div'>('div')`
- margin: 0 auto;
- display: inline-block;
- padding: 35px 30px 25px;
- background: url(${batOutlineUrl}) no-repeat top;
-` as any
-
-export const StyledHeaderText = styled<{}, 'p'>('p')`
- width: 261px;
- color: #FFFFFF;
- font-size: 16px;
- font-weight: 300;
- letter-spacing: 0.16px;
- line-height: 22px;
- margin: 0 auto;
- opacity: 0.5;
- font-family: Muli, sans-serif;
-` as any
-
-export const StyledBatLogo = styled<{}, 'span'>('span')`
- display: block;
- margin: -10px auto 2px;
- width: 150px;
- height: 115px;
- padding: 20px 0 15px;
-` as any
-
-export const StyledTitle = styled(Heading)`
- color: #FFFFFF;
- font-weight: 400;
- line-height: 22px;
- margin: 0;
- display: inline-block;
-` as any
-
-export const StyledDescText = styled<{}, 'p'>('p')`
- color: #FFFFFF;
- font-size: 16px;
- font-weight: normal;
- letter-spacing: 0;
- line-height: 24px;
- opacity: 0.5;
- margin: 15px auto 23px;
- text-align: center;
- width: 280px;
- font-family: Muli, sans-serif;
-` as any
-
-export const StyledJoinButton = styled(Button as ComponentType)`
- color: #FFF;
- margin: 0 auto 24px;
- outline: 0;
- &:hover {
- color: #e0e0e0;
- }
-` as any
-
-export const StyledFooterText = styled<{}, 'div'>('div')`
- color: #73CBFF;
- font-size: 14px;
- font-weight: 500;
- letter-spacing: -0.19px;
- line-height: 21px;
- display: block;
- text-align: center;
- cursor: pointer;
- margin: 0 0 16px;
-` as any
-
-export const StyledTrademark = styled<{}, 'span'>('span')`
- display: inline-block;
- vertical-align: text-top;
- margin-top: -13px;
- color: #FFF;
- font-size: 9px;
- font-weight: 500;
- opacity: 0.7;
-` as any
-
-export const StyledErrorMessage = styled<{}, 'span'>('span')`
- font-size: 16px;
- display: block;
- margin: 0px auto 20px;
- line-height: 28px;
- color: #FFF;
-`
-
-export const StyledTOSWrapper = styled<{}, 'div'>('div')`
- display: block;
- margin: 20px auto;
- width: 300px;
-`
-
-export const StyledServiceText = styled<{}, 'span'>('span')`
- color: rgba(255, 255, 255, 0.65);
- font-size: 14px;
- font-family: Muli, sans-serif;
- font-weight: normal;
- letter-spacing: 0;
- line-height: 18px;
-`
-
-export const StyledServiceLink = styled<{}, 'a'>('a')`
- cursor: pointer;
- color: ${palette.blue500};
- font-weight: 600;
-`
diff --git a/src/features/rewards/profile/__snapshots__/spec.tsx.snap b/src/features/rewards/profile/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 0cb49a137..000000000
--- a/src/features/rewards/profile/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,72 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Profile tests basic tests matches the snapshot 1`] = `
-.c0 {
- position: relative;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- font-family: Muli,sans-serif;
-}
-
-.c1 {
- position: relative;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- height: 24px;
- width: 24px;
-}
-
-.c2 {
- max-width: 100%;
- max-height: 100%;
-}
-
-.c3 {
- padding: 0 0 0 12px;
-}
-
-.c4 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- font-size: 14px;
- font-weight: 700;
- color: #3b3e4f;
-}
-
-
-
-
-
-
-
-`;
diff --git a/src/features/rewards/profile/index.tsx b/src/features/rewards/profile/index.tsx
deleted file mode 100644
index 0e889137a..000000000
--- a/src/features/rewards/profile/index.tsx
+++ /dev/null
@@ -1,284 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledWrapper,
- StyledContent,
- StyledImageWrapper,
- StyledImage,
- StyledVerified,
- StyledTitleWrap,
- StyledTitle,
- StyledProvider,
- StyledProviderWrap,
- StyledProviderWrapRefreshing,
- StyledProviderWrapRefreshFinished,
- StyledInlineVerified,
- StyledVerifiedText,
- StyledInlineUnVerified,
- StyledVerifiedCheckLink,
- StyledVerifiedCheckNoLink,
- StyledRefreshCheckOverlayFinished,
- StyledRefresh,
- StyledRefreshLoaderFinished,
- StyledRefreshOverlay,
- StyledRefreshOverlayFinished,
- StyledRefreshFinished,
- StyledVerifiedDivider
-} from './style'
-import { getLocale } from '../../../helpers'
-import { VerifiedSIcon, UnVerifiedSIcon, LoaderIcon, CheckmarkCircleS } from '../../../components/icons'
-
-export type Provider = 'twitter' | 'youtube' | 'twitch' | 'reddit' | 'vimeo' | 'github'
-
-export interface Props {
- id?: string
- src?: string
- title: string
- type?: 'big' | 'small'
- provider?: Provider
- verified?: boolean
- tableCell?: boolean
- showUnVerifiedHelpIcon?: boolean
- refreshingPublisher?: boolean
- publisherRefreshed?: boolean
- onRefreshPublisher?: () => void
-}
-
-/*
- TODO
- - add fallback image
- */
-export default class Profile extends React.PureComponent {
- static defaultProps = {
- type: 'small'
- }
-
- getProviderName (provider: Provider) {
- switch (provider) {
- case 'youtube':
- return `${getLocale('on')} YouTube`
- case 'twitter':
- return `${getLocale('on')} Twitter`
- case 'twitch':
- return `${getLocale('on')} Twitch`
- case 'reddit':
- return `${getLocale('on')} Reddit`
- case 'vimeo':
- return `${getLocale('on')} Vimeo`
- case 'github':
- return `${getLocale('on')} GitHub`
- }
- }
-
- getSrc (src?: string) {
- return src ? src : ''
- }
-
- getVerifiedInfo = () => {
- return (
- <>
-
-
- {' '}
-
- {getLocale('verifiedPublisher')}
-
- >
- )
- }
-
- getDefaultVerifiedPanelWrap = () => {
- return (
-
- {
- this.getVerifiedInfo()
- }
-
- )
- }
-
- getVerifiedPanelWrapRefreshing = () => {
- return (
- <>
-
- {
- this.getVerifiedInfo()
- }
-
-
-
-
-
-
- >
- )
- }
-
- getVerifiedPanelWrapRefreshFinished = () => {
- return (
- <>
-
- {
- this.getVerifiedInfo()
- }
-
-
-
-
-
-
-
-
-
-
-
- >
- )
- }
-
- getVerifiedPanelWrapping = () => {
- const {
- refreshingPublisher,
- publisherRefreshed
- } = this.props
-
- return (
- !refreshingPublisher && !publisherRefreshed ?
- this.getDefaultVerifiedPanelWrap()
- : !publisherRefreshed && refreshingPublisher ?
- this.getVerifiedPanelWrapRefreshing()
- :
- this.getVerifiedPanelWrapRefreshFinished()
- )
- }
-
- getUnverifiedInfo = () => {
- return (
- <>
-
-
- {' '}
-
- {getLocale('unVerifiedPublisher')}
-
-
- >
- )
- }
-
- getDefaultUnverifiedPanelWrap = () => {
- const { onRefreshPublisher } = this.props
- return (
-
- {
- this.getUnverifiedInfo()
- }
-
- {getLocale('unVerifiedCheck')}
-
-
- )
- }
-
- getUnverifiedPanelWrapRefreshing = () => {
- return (
- <>
-
- {
- this.getUnverifiedInfo()
- }
-
- {getLocale('unVerifiedCheck')}
-
-
-
-
-
-
-
- >
- )
- }
-
- getUnverifiedPanelWrapRefreshFinished = () => {
- return (
- <>
-
- {
- this.getUnverifiedInfo()
- }
-
- {getLocale('unVerifiedCheck')}
-
-
-
-
-
-
-
-
-
-
-
-
- >
- )
- }
-
- getUnverifiedPanelWrapping = () => {
- const {
- refreshingPublisher,
- publisherRefreshed
- } = this.props
-
- return (
- !publisherRefreshed && !refreshingPublisher ?
- this.getDefaultUnverifiedPanelWrap()
- : !publisherRefreshed && refreshingPublisher ?
- this.getUnverifiedPanelWrapRefreshing()
- :
- this.getUnverifiedPanelWrapRefreshFinished()
- )
- }
-
- render () {
- const {
- id,
- type,
- provider,
- src,
- title,
- verified,
- showUnVerifiedHelpIcon
- } = this.props
-
- return (
-
-
-
- {verified && type === 'small' ? (
-
-
-
- ) : null}
-
-
-
- {title}
- {provider ? (
-
- {this.getProviderName(provider)}
-
- ) : null}
-
- {verified && type === 'big' ? this.getVerifiedPanelWrapping()
- : showUnVerifiedHelpIcon ? this.getUnverifiedPanelWrapping()
- : null}
-
-
- )
- }
-}
diff --git a/src/features/rewards/profile/spec.tsx b/src/features/rewards/profile/spec.tsx
deleted file mode 100644
index 19bc678a2..000000000
--- a/src/features/rewards/profile/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import Profile from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('Profile tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#profile').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/profile/style.ts b/src/features/rewards/profile/style.ts
deleted file mode 100644
index 0e895314b..000000000
--- a/src/features/rewards/profile/style.ts
+++ /dev/null
@@ -1,268 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled, { css } from '../../../theme'
-import { Props } from './index'
-import { keyframes } from 'styled-components'
-
-const fadeInOut = keyframes`
- 0% {
- opacity: 0;
- }
- 20% {
- opacity: 1;
- }
- 80% {
- opacity: 1;
- }
- 100% {
- opacity: 0;
- }
-`
-
-const fadeIn = keyframes`
- from {
- opacity: 0.2;
- }
- to {
- opacity: 1;
- }
-`
-
-const fadeOutWrap = keyframes`
- from {
- opacity: 1;
- }
- to {
- opacity: 0.2;
- }
-`
-
-const fadeInFromNull = keyframes`
- from {
- opacity: 0;
- }
- to {
- opacity: 1;
- }
-`
-
-const fadeOutToNull = keyframes`
- from {
- opacity: 1;
- }
- to {
- opacity: 0;
- }
-`
-
-export const StyledWrapper = styled<{}, 'div'>('div')`
- position: relative;
- display: flex;
- align-items: center;
- font-family: ${p => p.theme.fontFamily.body};
-`
-
-export const StyledImageWrapper = styled, 'div'>('div')`
- position: relative;
- display: flex;
-
- ${p => p.type === 'big'
- ? css`
- height: 32px;
- width: 32px;
- `
- : css`
- height: 24px;
- width: 24px
- `
- };
-`
-
-/* Fill container height/width without setting explicit size on img */
-export const StyledImage = styled.img`
- max-width: 100%;
- max-height: 100%;
-`
-
-export const StyledVerified = styled<{}, 'span'>('span')`
- top: -6px;
- right: -8px;
- width: 16px;
- height: 16px;
- color: ${p => p.theme.palette.blurple500};
- background-color: #FFFFFF;
- border-radius: 20px;
- position: absolute;
-`
-
-export const StyledContent = styled.div`
- padding: 0 0 0 12px;
-`
-
-export const StyledTitleWrap = styled.div`
- display: flex;
- font-size: 14px;
- font-weight: 700;
- color: ${p => p.theme.palette.grey800};
-`
-
-export const StyledTitle = styled, 'span'>('span')`
- font-size: ${p => p.type === 'big' ? '18px' : null};
-`
-
-export const StyledProvider = styled, 'span'>('span')`
- padding-left: 4px;
- font-size: ${p => p.type === 'big' ? '16px' : null};
- font-weight: ${p => p.type === 'big' ? '400' : null};
-`
-
-export const StyledProviderWrap = styled<{}, 'div'>('div')`
- display: flex;
- align-items: center;
- font-size: 13px;
- margin: 4px 0;
-`
-
-export const StyledProviderWrapRefreshing = styled<{}, 'div'>('div')`
- display: flex;
- align-items: center;
- font-size: 13px;
- margin: 4px 0;
- opacity: 0.2;
- animation-name: ${fadeOutWrap};
- animation-duration: 500ms;
- animation-timing-function: ease-out;
- animation-fill-mode: forwards;
-`
-
-export const StyledProviderWrapRefreshFinished = styled<{}, 'div'>('div')`
- display: flex;
- align-items: center;
- font-size: 13px;
- margin: 4px 0;
- opacity: 0.2;
- animation-name: ${fadeIn};
- animation-duration: 500ms;
- animation-timing-function: ease-in;
- animation-fill-mode: forwards;
- animation-delay: 2250ms;
-`
-
-export const StyledVerifiedText = styled<{}, 'span'>('span')`
- color: ${p => p.theme.palette.grey800};
-`
-
-export const StyledVerifiedCheckLink = styled<{}, 'span'>('span')`
- color: ${p => p.theme.palette.blurple500};
- cursor: pointer;
- text-decoration: none;
- z-index: 1;
-
- &:hover{
- text-decoration: underline;
- color: ${p => p.theme.palette.blurple400};
- }
-`
-export const StyledVerifiedCheckNoLink = styled<{}, 'span'>('span')`
- color: ${p => p.theme.palette.grey400};
- text-decoration: none;
- z-index: 1;
-`
-
-export const StyledVerifiedDivider = styled.span`
- margin: 0 8px;
- height: 12px;
- width: 1px;
- background: ${p => p.theme.palette.grey400};
-`
-
-export const StyledInlineVerified = styled.span`
- color: ${p => p.theme.palette.blurple500};
- width: 16px;
- height: 16px;
- margin: 0 4px 0 0;
-`
-
-export const StyledInlineUnVerified = styled(StyledInlineVerified)`
- color: ${p => p.theme.palette.grey500};
-`
-
-export const StyledRefreshOverlay = styled<{}, 'div'>('div')`
- width: 100%;
- height: 100%;
- z-index: 1;
- position: absolute;
- display: flex;
- justify-content: center;
- color: ${p => p.theme.palette.blurple500};
- top: 0;
- left: 0;
- margin-top: 25px;
-`
-
-export const StyledRefreshOverlayFinished = styled<{}, 'div'>('div')`
- width: 100%;
- height: 100%;
- z-index: 2;
- position: absolute;
- display: flex;
- justify-content: center;
- color: ${p => p.theme.palette.blurple500};
- top: 0;
- left: 0;
- margin-top: 25px;
- opacity: 1;
- animation-name: ${fadeOutToNull};
- animation-duration: 500ms;
- animation-timing-function: ease-out;
- animation-fill-mode: forwards;
-`
-
-export const StyledRefreshCheckOverlayFinished = styled<{}, 'div'>('div')`
- width: 100%;
- height: 100%;
- z-index: 1;
- position: absolute;
- display: flex;
- justify-content: center;
- color: ${p => p.theme.palette.blurple500};
- top: 0;
- left: 0;
- margin-top: 25px;
- opacity: 0;
- animation-name: ${fadeInOut};
- animation-delay: 1000ms;
- animation-duration: 1250ms;
- animation-timing-function: ease-in-out;
- animation-fill-mode: forwards;
-`
-
-export const StyledRefresh = styled(StyledInlineVerified)`
- position: absolute;
- text-align: center;
- display: flex;
- opacity: 0;
- animation-name: ${fadeInFromNull};
- animation-duration: 500ms;
- animation-timing-function: ease-in;
- animation-fill-mode: forwards;
-`
-
-export const StyledRefreshLoaderFinished = styled(StyledInlineVerified)`
- position: absolute;
- text-align: center;
- display: flex;
-`
-
-export const StyledRefreshFinished = styled<{}, 'span'>('span')`
- position: absolute;
- height: 24px;
- width: 24px;
- color: ${p => p.theme.palette.blurple500};
-`
-
-export const StyledSubTitle = styled.span`
- margin-top: 4px;
-`
diff --git a/src/features/rewards/restoreSites/__snapshots__/spec.tsx.snap b/src/features/rewards/restoreSites/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 402f43f32..000000000
--- a/src/features/rewards/restoreSites/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,39 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`RestoreSites tests basic tests matches the snapshot 1`] = `
-.c0 {
- color: #4B4C5C;
- font-size: 14px;
- font-weight: 300;
- text-align: left;
- -webkit-letter-spacing: 0;
- -moz-letter-spacing: 0;
- -ms-letter-spacing: 0;
- letter-spacing: 0;
- margin-top: -20px;
- margin-bottom: 32px;
-}
-
-.c1 {
- color: #696fdc;
- display: inline-block;
- font-size: 13px;
- font-weight: normal;
- -webkit-letter-spacing: 0;
- -moz-letter-spacing: 0;
- -ms-letter-spacing: 0;
- letter-spacing: 0;
- cursor: pointer;
- margin-left: 8px;
-}
-
-
-`;
diff --git a/src/features/rewards/restoreSites/index.tsx b/src/features/rewards/restoreSites/index.tsx
deleted file mode 100644
index dd90d52e0..000000000
--- a/src/features/rewards/restoreSites/index.tsx
+++ /dev/null
@@ -1,44 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this file,
-* You can obtain one at http://mozilla.org/MPL/2.0/.
-*/
-
-import * as React from 'react'
-import { getLocale } from '../../../helpers'
-import {
- StyledExcludedText,
- StyledRestore
-} from './style'
-
-export interface Props {
- numExcludedSites: number
- onRestore?: () => void
- showText?: boolean
-}
-
-export default class RestoreSites extends React.PureComponent {
- getRestoreText () {
- return `(${getLocale('restoreAll')})`
- }
-
- getExclusionText (numSites: number) {
- return `${getLocale('excludedSitesText')} ${numSites}`
- }
-
- render () {
- const { numExcludedSites, onRestore, showText } = this.props
-
- return (
-
- {
- showText
- ? this.getExclusionText(numExcludedSites)
- : null
- }
-
- {this.getRestoreText()}
-
-
- )
- }
-}
diff --git a/src/features/rewards/restoreSites/spec.tsx b/src/features/rewards/restoreSites/spec.tsx
deleted file mode 100644
index a423c7f5a..000000000
--- a/src/features/rewards/restoreSites/spec.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this file,
-* You can obtain one at http://mozilla.org/MPL/2.0/.
-*/
-
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import RestoreSites from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('RestoreSites tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#restoresites').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/restoreSites/style.ts b/src/features/rewards/restoreSites/style.ts
deleted file mode 100644
index 4c7c8c87d..000000000
--- a/src/features/rewards/restoreSites/style.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this file,
-* You can obtain one at http://mozilla.org/MPL/2.0/.
-*/
-
-import styled from 'styled-components'
-
-export const StyledExcludedText = styled<{}, 'div'>('div')`
- color: #4B4C5C;
- font-size: 14px;
- font-weight: 300;
- text-align: left;
- letter-spacing: 0;
- margin-top: -20px;
- margin-bottom: 32px;
-`
-
-export const StyledRestore = styled<{}, 'a'>('a')`
- color: #696fdc;
- display: inline-block;
- font-size: 13px;
- font-weight: normal;
- letter-spacing: 0;
- cursor: pointer;
- margin-left: 8px;
-`
diff --git a/src/features/rewards/rewardsButton/__snapshots__/spec.tsx.snap b/src/features/rewards/rewardsButton/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 35a24ca19..000000000
--- a/src/features/rewards/rewardsButton/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,40 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`TipButton tests basic tests matches the snapshot 1`] = `
-.c0 {
- width: 100%;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- color: white;
- font-size: 14px;
- border-radius: 28px;
- background: inherit;
- border: none;
- cursor: pointer;
-}
-
-.c0:focus {
- outline: 0;
-}
-
-.c1 {
- font-family: Poppins,sans-serif;
- font-weight: 600;
- text-transform: uppercase;
- -webkit-letter-spacing: 0.39px;
- -moz-letter-spacing: 0.39px;
- -ms-letter-spacing: 0.39px;
- letter-spacing: 0.39px;
- margin: 0 auto;
-}
-
-
-`;
diff --git a/src/features/rewards/rewardsButton/index.tsx b/src/features/rewards/rewardsButton/index.tsx
deleted file mode 100644
index 5a7850de0..000000000
--- a/src/features/rewards/rewardsButton/index.tsx
+++ /dev/null
@@ -1,48 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this file,
-* You can obtain one at http://mozilla.org/MPL/2.0/.
-*/
-
-import * as React from 'react'
-import {
- StyledButtonWrapper,
- StyledButtonText,
- StyledIcon
-} from './style'
-
-export type Type = 'tip' | 'opt-in' | 'cta-opt-in'
-
-export interface Props {
- text?: string
- testId?: string
- type?: Type
- disabled?: boolean
- onClick?: () => void
- icon?: React.ReactNode
-}
-
-export default class RewardsButton extends React.PureComponent {
- render () {
- const { text, testId, type, disabled, onClick, icon } = this.props
-
- return (
-
-
- {text}
- {
- icon
- ?
- {icon}
-
- : null
- }
-
-
- )
- }
-}
diff --git a/src/features/rewards/rewardsButton/spec.tsx b/src/features/rewards/rewardsButton/spec.tsx
deleted file mode 100644
index 67e587756..000000000
--- a/src/features/rewards/rewardsButton/spec.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this file,
-* You can obtain one at http://mozilla.org/MPL/2.0/.
-*/
-
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import RewardsButton from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('TipButton tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#tipbutton').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/rewardsButton/style.ts b/src/features/rewards/rewardsButton/style.ts
deleted file mode 100644
index f9230a35b..000000000
--- a/src/features/rewards/rewardsButton/style.ts
+++ /dev/null
@@ -1,91 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this file,
-* You can obtain one at http://mozilla.org/MPL/2.0/.
-*/
-
-import { Type } from './index'
-import styled, { css } from 'styled-components'
-
-interface StyleProps {
- type?: Type
- hasIcon?: boolean
- disabled?: boolean
-}
-
-const getTypeStyle = (type?: Type, disabled?: boolean) => {
- let typeCss = null
-
- switch (type) {
- case 'tip':
- typeCss = css`
- height: 40px;
- color: #4C54D2;
- border-radius: 20px;
- font-size: 12px;
- border: 1px solid #A1A8F2;
- `
- break
- case 'opt-in':
- typeCss = css`
- height: 56px;
- border-radius: 28px;
- letter-spacing: .6px;
- border: 1px solid rgba(255, 255, 255, 0.35);
-
- &:hover {
- background: ${p => disabled ? 'inherit' : 'rgba(0, 0, 0, 0.05)'};
- }
- `
- break
- case 'cta-opt-in':
- typeCss = css`
- height: 56px;
- letter-spacing: .6px;
- background: ${p => p.theme.color.brandBrave};
-
- &:hover {
- background: ${p =>
- disabled
- ? p.theme.color.brandBrave
- : p.theme.brandBraveInteracting
- };
- }
- `
- break
- }
-
- return typeCss
-}
-
-export const StyledButtonWrapper = styled('button')`
- width: 100%;
- display: flex;
- color: white;
- font-size: 14px;
- border-radius: 28px;
- background: inherit;
- border: none;
- cursor: ${p => p.disabled ? 'default' : 'pointer'};
- ${p => getTypeStyle(p.type, p.disabled)}
-
- &:focus {
- outline: 0;
- }
-`
-
-export const StyledButtonText = styled('span')`
- font-family: Poppins, sans-serif;
- font-weight: 600;
- text-transform: uppercase;
- letter-spacing: 0.39px;
- margin: ${p => p.hasIcon ? '-3px auto 0px' : '0 auto'};
-`
-
-export const StyledIcon = styled<{}, 'div'>('div')`
- display: inline-block;
- line-height: 0;
- height: 18px;
- width: 18px;
- vertical-align: bottom;
- margin: 0 -4px 0 6px;
-`
diff --git a/src/features/rewards/settingsPage/__snapshots__/spec.tsx.snap b/src/features/rewards/settingsPage/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 3bfdd5dd4..000000000
--- a/src/features/rewards/settingsPage/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,25 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`SettingsPage tests basic tests matches the snapshot 1`] = `
-.c0 {
- background: #f2f4f7;
- min-height: 100vh;
- min-width: 1024px;
- font-family: Muli,sans-serif;
-}
-
-.c1 {
- max-width: 1024px;
- margin: 0 auto;
- padding: 48px 0;
-}
-
-
-`;
diff --git a/src/features/rewards/settingsPage/index.tsx b/src/features/rewards/settingsPage/index.tsx
deleted file mode 100644
index 1269e73bf..000000000
--- a/src/features/rewards/settingsPage/index.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import { StyledWrapper, StyledContent } from './style'
-
-export interface Props {
- id?: string
- children?: React.ReactNode
-}
-
-export default class SettingsPage extends React.PureComponent {
- render () {
- const { id, children } = this.props
-
- return (
-
-
- {children}
-
-
- )
- }
-}
diff --git a/src/features/rewards/settingsPage/spec.tsx b/src/features/rewards/settingsPage/spec.tsx
deleted file mode 100644
index 5c7213b3a..000000000
--- a/src/features/rewards/settingsPage/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import SettingsPage from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('SettingsPage tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#page').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/settingsPage/style.ts b/src/features/rewards/settingsPage/style.ts
deleted file mode 100644
index d56c42449..000000000
--- a/src/features/rewards/settingsPage/style.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from '../../../theme'
-
-export const StyledWrapper = styled<{}, 'div'>('div')`
- background: #f2f4f7;
- min-height: 100vh;
- min-width: 1024px;
- font-family: ${p => p.theme.fontFamily.body};
-`
-
-export const StyledContent = styled<{}, 'div'>('div')`
- max-width: 1024px;
- margin: 0 auto;
- padding: 48px 0;
-`
diff --git a/src/features/rewards/showAdsHistory/__snapshots__/spec.tsx.snap b/src/features/rewards/showAdsHistory/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 0e394efbb..000000000
--- a/src/features/rewards/showAdsHistory/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,30 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`ShowAdsHistory tests basic tests matches the snapshot 1`] = `
-.c0 {
- padding-top: 10px;
- text-align: right;
-}
-
-.c1 {
- display: inline-block;
- color: #ced0db;
- cursor: pointer;
- font-size: 13px;
- font-weight: normal;
- -webkit-letter-spacing: 0;
- -moz-letter-spacing: 0;
- -ms-letter-spacing: 0;
- letter-spacing: 0;
-}
-
-
-
- MISSING: openAdsHistory
-
-
-`;
diff --git a/src/features/rewards/showAdsHistory/index.tsx b/src/features/rewards/showAdsHistory/index.tsx
deleted file mode 100644
index a1b8284d7..000000000
--- a/src/features/rewards/showAdsHistory/index.tsx
+++ /dev/null
@@ -1,37 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledLink,
- StyledWrapper,
- StyledDisabledLink
-} from './style'
-
-import { getLocale } from '../../../helpers'
-
-export interface Props {
- onAdsHistoryOpen?: () => void
- notEmpty: boolean
-}
-
-export default class ShowAdsHistory extends React.PureComponent {
- render () {
- const { onAdsHistoryOpen, notEmpty } = this.props
-
- return (
-
- {
- notEmpty ?
-
- {getLocale('openAdsHistory')}
- :
-
- {getLocale('openAdsHistory')}
-
- }
-
- )
- }
-}
diff --git a/src/features/rewards/showAdsHistory/spec.tsx b/src/features/rewards/showAdsHistory/spec.tsx
deleted file mode 100644
index b3a5bd31d..000000000
--- a/src/features/rewards/showAdsHistory/spec.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this file,
-* You can obtain one at http://mozilla.org/MPL/2.0/.
-*/
-
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import ShowAdsHistory from './index';
-import { TestThemeProvider } from '../../../theme'
-
-describe('ShowAdsHistory tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#disabled-panel').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/showAdsHistory/style.ts b/src/features/rewards/showAdsHistory/style.ts
deleted file mode 100644
index 2874ae45b..000000000
--- a/src/features/rewards/showAdsHistory/style.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this file,
-* You can obtain one at http://mozilla.org/MPL/2.0/.
-*/
-
-import styled from 'styled-components'
-
-export const StyledWrapper = styled<{}, 'div'>('div')`
- padding-top: 10px;
- text-align: right;
-`
-
-export const StyledLink = styled<{}, 'a'>('a')`
- cursor: pointer;
- display: inline-block;
- color: ${p => p.theme.color.subtleActive};
- font-size: 13px;
- font-weight: normal;
- letter-spacing: 0;
-`
-
-export const StyledDisabledLink = styled<{}, 'span'>('span')`
- display: inline-block;
- color: ${p => p.theme.color.disabled};
- cursor: pointer;
- font-size: 13px;
- font-weight: normal;
- letter-spacing: 0;
-`
diff --git a/src/features/rewards/siteBanner/__snapshots__/spec.tsx.snap b/src/features/rewards/siteBanner/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 0006547b8..000000000
--- a/src/features/rewards/siteBanner/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,545 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`List tests basic tests matches the snapshot 1`] = `
-.c0 {
- overflow-y: scroll;
- height: auto;
- padding: 0px;
- font-family: Poppins,sans-serif;
-}
-
-.c6 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-box-pack: justify;
- -webkit-justify-content: space-between;
- -ms-flex-pack: justify;
- justify-content: space-between;
- -webkit-align-items: stretch;
- -webkit-box-align: stretch;
- -ms-flex-align: stretch;
- align-items: stretch;
- -webkit-align-content: flex-start;
- -ms-flex-line-pack: start;
- align-content: flex-start;
- -webkit-flex-wrap: nowrap;
- -ms-flex-wrap: nowrap;
- flex-wrap: nowrap;
- max-width: 1320px;
- margin: 0 auto;
-}
-
-.c7 {
- -webkit-box-flex: 1;
- -webkit-flex-grow: 1;
- -ms-flex-positive: 1;
- flex-grow: 1;
- -webkit-flex-shrink: 1;
- -ms-flex-negative: 1;
- flex-shrink: 1;
- -webkit-flex-basis: calc(100% - 336px);
- -ms-flex-preferred-size: calc(100% - 336px);
- flex-basis: calc(100% - 336px);
- background: #e9f0ff;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-flex-wrap: wrap;
- -ms-flex-wrap: wrap;
- flex-wrap: wrap;
- -webkit-align-items: flex-start;
- -webkit-box-align: flex-start;
- -ms-flex-align: flex-start;
- align-items: flex-start;
- -webkit-align-content: space-between;
- -ms-flex-line-pack: space-between;
- align-content: space-between;
-}
-
-.c15 {
- -webkit-flex-basis: 336px;
- -ms-flex-preferred-size: 336px;
- flex-basis: 336px;
- background: #696fdc;
- -webkit-box-pack: justify;
- -webkit-justify-content: space-between;
- -ms-flex-pack: justify;
- justify-content: space-between;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-flex-direction: column;
- -ms-flex-direction: column;
- flex-direction: column;
-}
-
-.c1 {
- position: relative;
- min-width: 900px;
- background: #DBE3F3;
-}
-
-.c4 {
- font-size: 38px;
- font-weight: 600;
- line-height: 0.74;
- color: #d1d1db;
- min-height: 176px;
- overflow: hidden;
- background: url(test-file-stub) no-repeat top left,url(test-file-stub) no-repeat top right,#9e9fab;
-}
-
-.c2 {
- top: 16px;
- right: 16px;
- position: absolute;
- background: none;
- border: none;
- padding: 0;
- cursor: pointer;
- width: 24px;
- height: 24px;
- color: #FFF;
- -webkit-filter: drop-shadow(0px 0px 2px rgba(0,0,0,.4));
- filter: drop-shadow(0px 0px 2px rgba(0,0,0,.4));
-}
-
-.c8 {
- padding-left: 45px;
- -webkit-flex-basis: 217px;
- -ms-flex-preferred-size: 217px;
- flex-basis: 217px;
- position: relative;
-}
-
-.c10 {
- background: inherit;
- -webkit-background-clip: text;
- color: transparent;
- -webkit-filter: invert(1) grayscale(1) contrast(9);
- filter: invert(1) grayscale(1) contrast(9);
- font-size: 80px;
- font-weight: 600;
- text-align: center;
- -webkit-letter-spacing: 0;
- -moz-letter-spacing: 0;
- -ms-letter-spacing: 0;
- letter-spacing: 0;
- line-height: 1;
- text-transform: uppercase;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- margin-top: 0px;
-}
-
-.c9 {
- border: 6px solid #fff;
- border-radius: 50%;
- width: 160px;
- height: 160px;
- background: #DE4D26;
- padding-top: 35px;
- margin: -66px 0 25px;
- overflow: hidden;
-}
-
-.c11 {
- -webkit-box-flex: 1;
- -webkit-flex-grow: 1;
- -ms-flex-positive: 1;
- flex-grow: 1;
- -webkit-flex-shrink: 1;
- -ms-flex-negative: 1;
- flex-shrink: 1;
- -webkit-flex-basis: calc(100% - 217px);
- -ms-flex-preferred-size: calc(100% - 217px);
- flex-basis: calc(100% - 217px);
-}
-
-.c13 {
- font-size: 28px;
- font-weight: 600;
- line-height: 1;
- color: #4b4c5c;
- margin: 10px 0 0;
- padding-left: 0px;
-}
-
-.c14 {
- font-family: Muli,sans-serif;
- font-size: 16px;
- line-height: 1.5;
- color: #686978;
- padding-right: 37px;
- padding-left: 0px;
-}
-
-.c16 {
- font-size: 12px;
- color: #afb2f1;
- text-align: right;
- margin: 8px 0 10px;
- padding: 0 19px 0 55px;
-}
-
-.c17 {
- color: #fff;
-}
-
-.c26 {
- color: rgba(255,255,255,0.65);
-}
-
-.c5 {
- max-width: 1024px;
- padding: 126px 0 0 238px;
- margin: 0 auto;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
-}
-
-.c12 {
- text-align: right;
- padding-right: 40px;
- margin-top: 15px;
-}
-
-.c22 {
- width: 180px;
- padding-left: 0px;
- margin: 15px 0 5px;
-}
-
-.c18 {
- position: relative;
- font-family: Muli,sans-serif;
- margin: 0px;
- --donate-content-padding: 0 19px 0 55px;
- --donate-send-bg: #4c54d2;
- --donate-send-color: #fff;
- --donate-send-padding: 14px 0px 13px 0px;
- --donate-funds-padding: 13px 12px 13px 24px;
-}
-
-.c19 {
- margin-top: 0px;
- padding: var(--donate-content-padding);
-}
-
-.c20 {
- font-size: 16px;
- font-weight: 600;
- line-height: 1.75;
- color: #fff;
- margin-bottom: 14px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- max-width: 167px;
- padding-left: 0px;
-}
-
-.c27 {
- background: var(--donate-send-bg);
- font-size: 13px;
- font-weight: 600;
- -webkit-letter-spacing: 0.2px;
- -moz-letter-spacing: 0.2px;
- -ms-letter-spacing: 0.2px;
- letter-spacing: 0.2px;
- color: var(--donate-send-color);
- padding: var(--donate-send-padding);
- text-transform: uppercase;
- border: none;
- width: 100%;
- text-align: left;
- cursor: pointer;
-}
-
-.c29 {
- display: block;
- border: none;
- font-size: 13px;
- font-weight: 600;
- text-transform: uppercase;
- background: var(--donate-send-bg);
- cursor: pointer;
-}
-
-.c28 {
- display: block;
- width: 245px;
- margin: 0 auto;
-}
-
-.c30 {
- vertical-align: middle;
- display: inline-block;
- margin-right: 15px;
- color: #a1a8f2;
- width: 27px;
- height: 27px;
-}
-
-.c21 {
- width: 100%;
- display: block;
-}
-
-.c3 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-.c31 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-.c23 {
- font-family: Muli,sans-serif;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- margin-bottom: 4px;
- --checkbox-label-color: #B8B9C4;
- --checkbox-label-size: 14px;
- color: var(--checkbox-label-color);
- font-size: var(--checkbox-label-size);
- cursor: pointer;
-}
-
-.c24 {
- border-radius: 2px;
- text-align: center;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- -webkit-box-pack: center;
- -webkit-justify-content: center;
- -ms-flex-pack: center;
- justify-content: center;
- padding: 2px;
- --checkbox-box-size: 18px;
- --checkbox-box-borderColor: #D1D1DB;
- --checkbox-box-color: #A1A8F2;
- --checkbox-box-spacing: 12px;
- -webkit-flex-basis: var(--checkbox-box-size);
- -ms-flex-preferred-size: var(--checkbox-box-size);
- flex-basis: var(--checkbox-box-size);
- width: var(--checkbox-box-size);
- height: var(--checkbox-box-size);
- color: var(--checkbox-box-color);
- border: 1px solid var(--checkbox-box-borderColor);
- margin: 8px;
-}
-
-.c25 {
- -webkit-flex: 1;
- -ms-flex: 1;
- flex: 1;
- padding-top: 1px;
- -webkit-letter-spacing: 0;
- -moz-letter-spacing: 0;
- -ms-letter-spacing: 0;
- letter-spacing: 0;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
-}
-
-
-
-
-
-
-
-
-
-
-
- MISSING: welcome
-
-
-
- MISSING: rewardsBannerText1
-
-
- MISSING: rewardsBannerText2
-
-
-
-
-
-
- MISSING: walletBalance
-
-
- BAT
-
-
-
-
-
- MISSING: donationAmount
-
-
-
-
-
-
-
-
- MISSING: makeMonthly
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-`;
diff --git a/src/features/rewards/siteBanner/assets/bg_bats.svg b/src/features/rewards/siteBanner/assets/bg_bats.svg
deleted file mode 100644
index b0318e87a..000000000
--- a/src/features/rewards/siteBanner/assets/bg_bats.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/features/rewards/siteBanner/assets/bg_hearts.svg b/src/features/rewards/siteBanner/assets/bg_hearts.svg
deleted file mode 100644
index 30f21597b..000000000
--- a/src/features/rewards/siteBanner/assets/bg_hearts.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/features/rewards/siteBanner/index.tsx b/src/features/rewards/siteBanner/index.tsx
deleted file mode 100644
index 100185cbb..000000000
--- a/src/features/rewards/siteBanner/index.tsx
+++ /dev/null
@@ -1,362 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import * as CSS from 'csstype'
-import {
- StyledWrapper,
- StyledDonation,
- StyledContent,
- StyledBanner,
- StyledBannerFiller,
- StyledBannerImage,
- StyledClose,
- StyledContentWrapper,
- StyledLogoWrapper,
- StyledLogoBorder,
- StyledTextWrapper,
- StyledTitle,
- StyledText,
- StyledWallet,
- StyledTokens,
- StyledCenter,
- StyledUserName,
- StyledScreenName,
- StyledSocialItem,
- StyledSocialIcon,
- StyledOption,
- StyledLogoText,
- StyledSocialWrapper,
- StyledEmptyBox,
- StyledLogoImage,
- StyledCheckbox,
- StyledNoticeWrapper,
- StyledNoticeIcon,
- StyledNoticeText,
- StyledNoticeLink,
- StyledVerifiedIcon
-} from './style'
-
-import Donate from '../donate/index'
-import Checkbox from '../../../components/formControls/checkbox/index'
-import { getLocale } from '../../../helpers'
-import {
- CloseCircleOIcon,
- TwitterColorIcon,
- YoutubeColorIcon,
- TwitchColorIcon,
- RedditColorIcon,
- GitHubColorIcon,
- AlertCircleIcon,
- VerifiedSIcon
-} from '../../../components/icons'
-
-export type Social = { type: SocialType, url: string }
-export type SocialType = 'twitter' | 'youtube' | 'twitch' | 'reddit' | 'vimeo' | 'github'
-export type Donation = { tokens: string, converted: string, selected?: boolean }
-
-export interface Props {
- balance: string
- currentAmount: string
- donationAmounts: Donation[]
- onAmountSelection: (tokens: string) => void
- id?: string
- title?: string
- name?: string
- screenName?: string
- domain: string
- bgImage?: string
- logo?: string
- social?: Social[]
- provider?: SocialType
- recurringDonation?: boolean
- children?: React.ReactNode
- onDonate: (amount: string, monthly: boolean) => void
- onClose?: () => void
- logoBgColor?: CSS.Color
- showUnVerifiedNotice?: boolean
- learnMoreNotice?: string
- addFundsLink?: string
- isVerified?: boolean
-}
-
-interface State {
- monthly: boolean
-}
-
-export default class SiteBanner extends React.PureComponent {
- constructor (props: Props) {
- super(props)
- this.state = {
- monthly: false
- }
- }
-
- getLogo (logo: string | undefined, domain: string, name: string | undefined) {
- let letter = domain && domain.substring(0, 1) || ''
-
- if (name) {
- letter = name.substring(0, 1)
- }
-
- return !logo
- ? {letter}
- :
- }
-
- getSocialData (item: Social) {
- let logo = null
- switch (item.type) {
- case 'twitter':
- logo =
- break
- case 'youtube':
- logo =
- break
- case 'twitch':
- logo =
- break
- case 'github':
- logo =
- break
- case 'reddit':
- logo =
- break
- }
-
- return logo
- }
-
- getSocial = (social?: Social[]) => {
- if (!social || social.length === 0) {
- return null
- }
-
- const self = this
- return social.map((item: Social) => {
- const logo = self.getSocialData(item)
- return (
-
-
- {logo}
-
-
- )
- })
- }
-
- getTitle (title?: string) {
- return title ? title : getLocale('welcome')
- }
-
- getBannerTitle (name?: string, domain?: string, provider?: SocialType) {
- const identifier = name || domain
-
- if (!provider) {
- return identifier
- }
-
- switch (provider) {
- case 'youtube':
- return `${identifier} ${getLocale('on')} YouTube`
- case 'twitter':
- return `${identifier} ${getLocale('on')} Twitter`
- case 'twitch':
- return `${identifier} ${getLocale('on')} Twitch`
- case 'reddit':
- return `${identifier} ${getLocale('on')} Reddit`
- case 'vimeo':
- return `${identifier} ${getLocale('on')} Vimeo`
- case 'github':
- return `${identifier} ${getLocale('on')} GitHub`
- default:
- return identifier
- }
- }
-
- getBannerImageContent (name?: string, screenName?: string, domain?: string, provider?: SocialType) {
- if (screenName) {
- return (
- <>
-
- {this.getBannerTitle(name, domain, provider)}
-
-
- {screenName}
-
- >
- )
- } else {
- return (
-
- {this.getBannerTitle(name, domain, provider)}
-
- )
- }
- }
-
- getText (children?: React.ReactNode) {
- if (!children) {
- return (
- <>
-
- {getLocale('rewardsBannerText1')}
-
-
- {getLocale('rewardsBannerText2')}
-
- >
- )
- }
-
- return children
- }
-
- onMonthlyChange = (key: string, selected: boolean) => {
- this.setState({ monthly: selected })
- }
-
- onDonate = (amount: string) => {
- if (this.props.onDonate) {
- this.props.onDonate(amount, this.state.monthly)
- }
- }
-
- onKeyUp = (e: React.KeyboardEvent) => {
- if (e.key.toLowerCase() === 'escape' && this.props.onClose) {
- this.props.onClose()
- }
- }
-
- render () {
- const {
- id,
- bgImage,
- onClose,
- logo,
- social,
- provider,
- children,
- title,
- recurringDonation,
- balance,
- donationAmounts,
- domain,
- onAmountSelection,
- logoBgColor,
- currentAmount,
- name,
- screenName,
- showUnVerifiedNotice,
- learnMoreNotice,
- addFundsLink,
- isVerified
- } = this.props
-
- const isTwitterTip: boolean = !!(screenName && screenName !== '')
-
- return (
-
-
-
-
-
-
- {
- !bgImage
- ? this.getBannerImageContent(name, screenName, domain, provider)
- :
- }
-
-
-
-
- {
- isVerified
- ?
-
-
- : null
- }
-
-
- {this.getLogo(logo, domain, name)}
-
-
-
-
- {this.getSocial(social)}
-
- {
- showUnVerifiedNotice
- ?
-
-
-
-
- {getLocale('siteBannerNoticeNote')}{' '}
- {getLocale(isVerified ? 'siteBannerConnectedText' : 'siteBannerNoticeText')}
- {getLocale('unVerifiedTextMore')}
-
-
- : null
- }
-
- {this.getTitle(title)}
-
-
- {this.getText(children)}
-
-
-
-
-
- {getLocale('walletBalance')} {balance} BAT
-
-
- {
- !recurringDonation
- ?
-
-
- {getLocale('makeMonthly')}
-
-
-
- :
- }
-
-
-
-
-
- )
- }
-}
diff --git a/src/features/rewards/siteBanner/spec.tsx b/src/features/rewards/siteBanner/spec.tsx
deleted file mode 100644
index fa67d8d23..000000000
--- a/src/features/rewards/siteBanner/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import List from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('List tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#list').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/siteBanner/style.ts b/src/features/rewards/siteBanner/style.ts
deleted file mode 100644
index adc72892b..000000000
--- a/src/features/rewards/siteBanner/style.ts
+++ /dev/null
@@ -1,269 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-import { Props } from './index'
-import bg1Url from './assets/bg_bats.svg'
-import bg2Url from './assets/bg_hearts.svg'
-
-interface StyleProps {
- padding?: boolean
- bg?: string
- isTwitterTip?: boolean
-}
-
-export const StyledWrapper = styled('div')`
- overflow-y: scroll;
- height: auto;
- padding: 0px;
- font-family: Poppins, sans-serif;
-`
-
-export const StyledContentWrapper = styled('div')`
- display: flex;
- justify-content: space-between;
- align-items: stretch;
- align-content: flex-start;
- flex-wrap: nowrap;
- max-width: 1320px;
- margin: 0 auto;
-`
-
-export const StyledContent = styled<{}, 'div'>('div')`
- flex-grow: 1;
- flex-shrink: 1;
- flex-basis: calc(100% - 336px);
- background: #e9f0ff;
- display: flex;
- flex-wrap: wrap;
- align-items: flex-start;
- align-content: space-between;
-`
-
-export const StyledDonation = styled('div')`
- flex-basis: 336px;
- background: #696fdc;
- justify-content: space-between;
- display: flex;
- flex-direction: column;
-`
-
-export const StyledBanner = styled('div')`
- position: relative;
- min-width: 900px;
- background: #DBE3F3;
-`
-
-export const StyledBannerImage = styled, 'div'>('div')`
- font-size: 38px;
- font-weight: 600;
- line-height: 0.74;
- color: #d1d1db;
- min-height: 176px;
- overflow: hidden;
- background: ${p => p.bgImage
- ? `url(${p.bgImage}) no-repeat top center / cover`
- : `url(${bg1Url}) no-repeat top left, url(${bg2Url}) no-repeat top right, #9e9fab`
- };
-`
-
-// 900:176 is the aspect ratio for banner images.
-export const StyledBannerFiller = styled<{}, 'div'>('div')`
- padding-top: calc(176 / 900 * 100%);
-`
-
-export const StyledClose = styled<{}, 'button'>('button')`
- top: 16px;
- right: 16px;
- position: absolute;
- background: none;
- border: none;
- padding: 0;
- cursor: pointer;
- width: 24px;
- height: 24px;
- color: #FFF;
- filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .4));
-`
-
-export const StyledLogoWrapper = styled('div')`
- padding-left: 45px;
- flex-basis: 217px;
- position: relative;
-`
-
-export const StyledLogoText = styled('div')`
- background: inherit;
- -webkit-background-clip: text;
- color: transparent;
- filter: invert(1) grayscale(1) contrast(9);
- font-size: 80px;
- font-weight: 600;
- text-align: center;
- letter-spacing: 0;
- line-height: 1;
- text-transform: uppercase;
- user-select: none;
- margin-top: 0px;
-`
-
-export const StyledLogoBorder = styled('div')`
- border: 6px solid #fff;
- border-radius: 50%;
- width: 160px;
- height: 160px;
- background: ${p => p.bg || '#DE4D26'};
- padding-top: ${p => p.padding ? '35px' : 0};
- margin: -66px 0 25px;
- overflow: hidden;
-`
-
-export const StyledTextWrapper = styled('div')`
- flex-grow: 1;
- flex-shrink: 1;
- flex-basis: calc(100% - 217px);
-`
-
-export const StyledTitle = styled('div')`
- font-size: ${p => p.isTwitterTip ? 18 : 28}px;
- font-weight: 600;
- line-height: 1;
- color: #4b4c5c;
- margin: 10px 0 0;
- padding-left: 0px;
-`
-
-export const StyledText = styled('div')`
- font-family: Muli, sans-serif;
- font-size: 16px;
- line-height: 1.5;
- color: #686978;
- padding-right: 37px;
- padding-left: 0px;
-`
-
-export const StyledWallet = styled('div')`
- font-size: 12px;
- color: #afb2f1;
- text-align: right;
- margin: 8px 0 10px;
- padding: 0 19px 0 55px;
-`
-
-export const StyledTokens = styled<{}, 'span'>('span')`
- color: #fff;
-`
-
-export const StyledOption = styled<{}, 'span'>('span')`
- color: rgba(255, 255, 255, 0.65);
-`
-
-export const StyledCenter = styled<{}, 'div'>('div')`
- max-width: 1024px;
- padding: 126px 0 0 238px;
- margin: 0 auto;
- user-select: none;
-`
-
-export const StyledUserName = styled<{}, 'div'>('div')`
- font-size: 38px;
- color: #fff;
- max-width: 1024px;
- padding: 70px 0 0 238px;
- margin: 0 auto;
- user-select: none;
-`
-
-export const StyledScreenName = styled<{}, 'div'>('div')`
- font-size: 24px;
- font-weight: 400;
- color: #000;
- max-width: 1024px;
- padding: 10px 0 0 238px;
- margin: 10px auto;
- user-select: none;
-`
-
-export const StyledSocialItem = styled<{}, 'a'>('a')`
- font-size: 12px;
- line-height: 2.5;
- letter-spacing: 0.2px;
- color: #9e9fab;
- text-decoration: none;
- display: inline-block;
- margin: 0 8px;
-`
-
-export const StyledSocialIcon = styled<{}, 'span'>('span')`
- vertical-align: middle;
- display: inline-block;
- margin-right: 5px;
- width: 22px;
- height: 22px;
-`
-
-export const StyledSocialWrapper = styled('div')`
- text-align: right;
- padding-right: 40px;
- margin-top: 15px;
-`
-
-export const StyledEmptyBox = styled<{}, 'div'>('div')`
- width: 100%;
- height: 39px;
-`
-
-export const StyledLogoImage = styled('div')`
- width: 148px;
- height: 148px;
- background: url(${p => p.bg}) no-repeat;
- background-size: cover;
-`
-
-export const StyledCheckbox = styled('div')`
- width: 180px;
- padding-left: 0px;
- margin: 15px 0 5px;
-`
-export const StyledNoticeWrapper = styled<{}, 'div'>('div')`
- background: #fff;
- border: 1px solid rgba(155, 157, 192, 0);
- border-radius: 4px;
- width: 90%;
- margin: 10px 0 18px;
- padding: 7px 15px;
- display: flex;
-`
-export const StyledNoticeIcon = styled<{}, 'div'>('div')`
- width: 39px;
- height: 39px;
- color: #00AEFF;
- margin: -2px 6px 0 0;
-`
-export const StyledNoticeText = styled<{}, 'div'>('div')`
- flex: 1;
- color: #67667D;
- font-size: 12px;
- font-family: ${p => p.theme.fontFamily.body};
- letter-spacing: 0;
- line-height: 18px;
-`
-export const StyledNoticeLink = styled<{}, 'a'>('a')`
- color: #0095FF;
- font-family: ${p => p.theme.fontFamily.body};
- font-weight: bold;
- display: inline-block;
- text-decoration: none;
- margin-left: 4px;
-`
-export const StyledVerifiedIcon = styled<{}, 'div'>('div')`
- position: absolute;
- top: -60px;
- right: 12px;
- width: 40px;
- height: 40px;
- color: ${p => p.theme.palette.blurple500};
- background-color: ${p => p.theme.palette.white};
- border-radius: 100%;
-`
diff --git a/src/features/rewards/tab/__snapshots__/spec.tsx.snap b/src/features/rewards/tab/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 386204495..000000000
--- a/src/features/rewards/tab/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,129 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Tab tests basic tests matches the snapshot 1`] = `
-.c0 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- font-family: Poppins,sans-serif;
-}
-
-.c1 {
- position: relative;
- display: block;
- width: 100%;
- height: 43px;
- cursor: pointer;
-}
-
-.c2 {
- width: 100%;
- height: 100%;
- background: #DFDFE8;
- border-radius: 21.5px 21.5px 21.5px 21.5px;
-}
-
-.c7 {
- top: -17px;
- width: 50%;
- height: 37px;
- background: #FFFFFF;
- border-radius: 21.5px 21.5px 21.5px 21.5px;
- position: relative;
- -webkit-transition: all .4s ease;
- transition: all .4s ease;
- -webkit-transform: translate(calc(2%),calc(-50% - 4px));
- -ms-transform: translate(calc(2%),calc(-50% - 4px));
- transform: translate(calc(2%),calc(-50% - 4px));
- box-shadow: 0 3px 3px rgba(0,0,0,0.05);
-}
-
-.c3 {
- width: 50%;
- display: block;
- height: 100%;
- float: left;
-}
-
-.c5 {
- width: 50%;
- display: block;
- height: 100%;
- float: right;
-}
-
-.c4 {
- z-index: 9;
- position: relative;
- font-size: 14px;
- width: 70%;
- margin: 13px auto 0 auto;
- text-overflow: ellipsis;
- display: block;
- overflow: hidden;
- text-align: center;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- color: #FB542B;
- font-weight: 500;
-}
-
-.c6 {
- z-index: 9;
- position: relative;
- font-size: 14px;
- width: 70%;
- margin: 13px auto 0 auto;
- text-overflow: ellipsis;
- display: block;
- overflow: hidden;
- text-align: center;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- color: #84889c;
- font-weight: normal;
-}
-
-
-`;
diff --git a/src/features/rewards/tab/index.tsx b/src/features/rewards/tab/index.tsx
deleted file mode 100644
index c00bc1391..000000000
--- a/src/features/rewards/tab/index.tsx
+++ /dev/null
@@ -1,85 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- RewardsTabWrapper,
- StyledSlider,
- StyledBullet,
- StyledText,
- StyledTab,
- StyledSwitch
-} from './style'
-
-export type Type = 'contribute' | 'restore'
-
-export interface Props {
- tabTitles?: string[]
- testId?: string
- type?: Type
- tabIndexSelected?: number
- onChange?: (event: React.MouseEvent) => void
-}
-
-export default class Tab extends React.PureComponent {
- static defaultProps = {
- tabIndexSelected: 0
- }
-
- getTabs = (tabTitles: string[]) => {
- const { type } = this.props
-
- const tabs: React.ReactNode[] = tabTitles.map((title: string, i: number) => {
- return (
-
-
- {title}
-
-
- )
- })
- return tabs
- }
-
- onSwitchChange = (index: number, event: React.MouseEvent) => {
- if (index === this.props.tabIndexSelected) {
- return
- }
-
- if (this.props.onChange) {
- this.props.onChange(event)
- }
- }
-
- render () {
- const {
- testId,
- tabTitles,
- tabIndexSelected
- } = this.props
-
- if (!tabTitles || tabTitles.length !== 2) {
- console.warn('Rewards Tab currently supports 2 tab titles')
- return null
- }
-
- return (
-
-
-
- {this.getTabs(tabTitles)}
-
-
-
-
- )
- }
-}
diff --git a/src/features/rewards/tab/spec.tsx b/src/features/rewards/tab/spec.tsx
deleted file mode 100644
index 949d2d522..000000000
--- a/src/features/rewards/tab/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import Tab from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('Tab tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#tab').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/tab/style.ts b/src/features/rewards/tab/style.ts
deleted file mode 100644
index 8d08cbb6f..000000000
--- a/src/features/rewards/tab/style.ts
+++ /dev/null
@@ -1,70 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-import { Type, Props } from './index'
-import palette from '../../../theme/colors'
-
-interface StyleProps {
- left?: boolean
- selected?: boolean
- type?: Type
-}
-
-export const RewardsTabWrapper = styled<{}, 'div'>('div')`
- display: flex;
- font-family: Poppins,sans-serif;
-`
-
-export const StyledSwitch = styled<{}, 'div'>('div')`
- position: relative;
- display: block;
- width: 100%;
- height: 43px;
- cursor: pointer;
-`
-
-export const StyledSlider = styled<{}, 'div'>('div')`
- width: 100%;
- height: 100%;
- background: #DFDFE8;
- border-radius: 21.5px 21.5px 21.5px 21.5px;
-`
-
-export const StyledBullet = styled('div')`
- top: -17px;
- width: 50%;
- height: 37px;
- background: ${p => p.theme.color.primaryBackground};
- border-radius: 21.5px 21.5px 21.5px 21.5px;
- position: relative;
- transition: all .4s ease;
- transform: translate(calc(${p => p.tabIndexSelected === 0 ? 2 : 97}%), calc(-50% - 4px));
- box-shadow: 0 3px 3px rgba(0, 0, 0, 0.05);
-`
-
-export const StyledTab = styled('div')`
- width: 50%;
- display: block;
- height: 100%;
- float: ${p => p.left ? 'left' : 'right'};
-`
-
-export const StyledText = styled('div')`
- z-index: 9;
- position: relative;
- font-size: 14px;
- width: 70%;
- margin: 13px auto 0 auto;
- text-overflow: ellipsis;
- display: block;
- overflow: hidden;
- text-align: center;
- user-select: none;
- color: ${p => p.selected
- ? p.type === 'contribute' ? palette.blurple500 : p.theme.color.brandBrave
- : p.theme.color.subtleActive
- };
- font-weight: ${p => p.selected ? '500' : 'normal'};
-`
diff --git a/src/features/rewards/tableAdsHistory/__snapshots__/spec.tsx.snap b/src/features/rewards/tableAdsHistory/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 3f9e6c341..000000000
--- a/src/features/rewards/tableAdsHistory/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,21 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Amount tests basic tests matches the snapshot 1`] = `
-.c0 {
- -webkit-text-decoration: none;
- text-decoration: none;
- font-size: 16px;
- font-weight: 400;
- padding-top: 24px;
-}
-
-
-
- MISSING: noAdsHistory
-
-
-`;
diff --git a/src/features/rewards/tableAdsHistory/index.tsx b/src/features/rewards/tableAdsHistory/index.tsx
deleted file mode 100644
index dacd51368..000000000
--- a/src/features/rewards/tableAdsHistory/index.tsx
+++ /dev/null
@@ -1,246 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledDateTH,
- StyledAdTH,
- StyledCategoryTH,
- StyledAdContentDiv,
- StyledLogo,
- StyledLogoDiv,
- StyledAdInfoDiv,
- StyledAdBrand,
- StyledAdInfo,
- StyledAdStatDiv,
- StyledAdStat,
- StyledAdStatActions,
- StyledCategoryContentDiv,
- StyledCategoryName,
- StyledCategoryActions,
- StyledAdLink,
- StyledNoAdHistoryDiv,
- StyledNoLogoDiv,
- StyledTD
-} from './style'
-import { Row } from '../../../components/dataTables/table'
-import { StyledTable } from '../../../components/dataTables/table/style'
-import ThumbLikePicker from '../thumbLikePicker'
-import CategoryLikePicker from '../categoryLikePicker'
-import DropMenu from '../dropMenu'
-import AdRowsDetails from '../adRowsDetails'
-import { getLocale } from '../../../helpers'
-
-export interface DetailRow {
- id: string
- date: string
- adDetailRows: AdDetailRow[]
-}
-
-export type AdAction = 'click' | 'dismiss' | 'view' | 'landed'
-
-interface AdContent {
- brand: string
- brandInfo: string
- brandLogo: string
- brandUrl: string
- brandDisplayUrl: string
- likeAction: number
- adAction: AdAction
- savedAd: boolean
- flaggedAd: boolean
- logoUrl?: string
- onThumbUpPress?: () => void
- onThumbDownPress?: () => void
- onMenuSave?: () => void
- onMenuFlag?: () => void
-}
-
-interface CategoryContent {
- category: string
- optAction: number
- onOptInAction?: () => void
- onOptOutAction?: () => void
-}
-
-export interface AdDetailRow {
- id: string
- adContent: AdContent
- categoryContent: CategoryContent
-}
-
-export interface Props {
- header: string[]
- id?: string
- testId?: string
- children?: React.ReactNode
- headerColor?: boolean
- rows?: DetailRow[]
- allItems: number
-}
-
-export default class TableAdsHistory extends React.PureComponent {
- getAdsHistoryTable = (header: string[], rows: DetailRow[]): any => {
- return (
-
- {
- header ?
-
-
- {
- this.getHeader(header)
- }
-
-
- : null
- }
-
- {
- this.getRows(rows)
- }
-
-
- )
- }
-
- getHeader = (header: string[]) => {
- if (!header) {
- return
- }
-
- return (
- <>
- {header[0]}
- {header[1]}
- {header[2]}
- >
- )
- }
-
- getRows = (rows: DetailRow[]) => {
- return rows.map((row: DetailRow, i: number) => {
- const detailRows = this.getDetailRows(row.adDetailRows)
- return (
- detailRows && detailRows.length > 0 ?
-
- : null
- )
- })
- }
-
- getCategoryContent = (content: CategoryContent) => {
- return (
-
-
- {content.category}
-
-
-
-
-
- )
- }
-
- getAdContent = (content: AdContent) => {
- return (
-
-
- {
- content.logoUrl ?
-
-
-
- :
-
- }
-
- {content.brand}
- {content.brandInfo}
- {content.brandDisplayUrl}
-
-
-
-
- {getLocale(content.adAction)}
-
-
-
-
-
-
-
-
- )
- }
-
- getDetailRows = (rows: AdDetailRow[]): Row[] | undefined => {
- if (!rows) {
- return
- }
- let filteredRows = rows
- if (this.props.allItems === 1) {
- filteredRows = rows.filter((row: AdDetailRow) => {
- return row.adContent && row.adContent.savedAd
- })
- } else if (this.props.allItems === 2) {
- filteredRows = rows.filter((row: AdDetailRow) => {
- return row.adContent && row.adContent.likeAction === 1
- })
- }
- return filteredRows.map((row: AdDetailRow, i: number): Row => {
- const cell: Row = {
- content: [
- {
- content: (
-
- )
- },
- {
- content: (
- this.getAdContent(row.adContent)
- )
- },
- {
- content: (
- this.getCategoryContent(row.categoryContent)
- )
- }
- ]
- }
- return cell
- })
- }
-
- render () {
- const { id, testId, header, rows } = this.props
- return (
-
- {
- rows ?
- this.getAdsHistoryTable(header, rows)
- :
-
- {
- getLocale('noAdsHistory')
- }
-
- }
-
-
- )
- }
-}
diff --git a/src/features/rewards/tableAdsHistory/spec.tsx b/src/features/rewards/tableAdsHistory/spec.tsx
deleted file mode 100644
index 91aa46566..000000000
--- a/src/features/rewards/tableAdsHistory/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import { TestThemeProvider } from '../../../theme'
-import TableAdsHistory from './index';
-
-describe('Amount tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#tableAdsHistory').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/tableAdsHistory/style.ts b/src/features/rewards/tableAdsHistory/style.ts
deleted file mode 100644
index 06d6a2a06..000000000
--- a/src/features/rewards/tableAdsHistory/style.ts
+++ /dev/null
@@ -1,156 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License. v. 2.0. If a copy of the MPL was not distributed with this file.
-* You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-
-export const StyledDateTH = styled<{}, 'th'>('th')`
- text-transform: uppercase;
- text-align: left;
- font-family: ${p => p.theme.fontFamily.body};
- font-size: 12px;
- font-weight: 500;
- border-bottom: 2px solid ${p => p.theme.color.separatorLine};
- border-top: 2px solid ${p => p.theme.color.separatorLine};
- color: ${p => p.theme.color.text};
- padding: 12px 0;
- min-width: 55px;
-`
-
-export const StyledAdTH = styled<{}, 'th'>('th')`
- text-transform: uppercase;
- text-align: left;
- font-family: ${p => p.theme.fontFamily.body};
- font-size: 12px;
- font-weight: 500;
- border-bottom: 2px solid ${p => p.theme.color.separatorLine};
- border-top: 2px solid ${p => p.theme.color.separatorLine};
- color: ${p => p.theme.color.text};
- padding: 12px 0;
- min-width: 550px;
-`
-
-export const StyledCategoryTH = styled<{}, 'th'>('th')`
- text-transform: uppercase;
- text-align: left;
- font-family: ${p => p.theme.fontFamily.body};
- font-size: 12px;
- font-weight: 500;
- border-bottom: 2px solid ${p => p.theme.color.separatorLine};
- border-top: 2px solid ${p => p.theme.color.separatorLine};
- color: ${p => p.theme.color.text};
- padding: 12px 0;
- min-width: 220px;
-`
-
-export const StyledOuterTD = styled<{}, 'td'>('td')`
- width: 100%;
-`
-
-export const StyledTR = styled<{}, 'tr'>('tr')`
- text-align: left;
-`
-
-export const StyledAdLink = styled<{}, 'a'>('a')`
- text-decoration: none;
- cursor: pointer;
- display: flex;
- color: ${p => p.theme.color.text};
-`
-
-export const StyledAdTable = styled<{}, 'table'>('table')`
- min-width: 100%;
- margin: 24px 0;
- padding-top: 15px;
-`
-export const StyledAdContentDiv = styled<{}, 'div'>('div')`
- min-width: 550px;
- border: 1px solid;
- border-collapse: separate;
- border-radius: 5px;
- border-color: ${p => p.theme.color.subtle};
- padding: 10px;
- display: inline-flex;
- align-items: center;
- height: 85px;
-`
-
-export const StyledLogo = styled<{}, 'img'>('img') `
- width: 64px;
- height: 64px;
-`
-
-export const StyledLogoDiv = styled<{}, 'div'>('div')`
- display: inline-block;
- width: 64px;
- height: 64px;
- padding: 1px;
- padding-right: 10px;
-`
-
-export const StyledNoLogoDiv = styled<{}, 'div'>('div')`
- display: none;
-`
-
-export const StyledAdInfoDiv = styled<{}, 'div'>('div')`
- padding-left: 20px;
- display: inline-block;
-`
-export const StyledAdInfo = styled<{}, 'div'>('div')`
- display: block;
- color: ${p => p.theme.fontFamily.detailDescription};
- padding-bottom: 2px;
-`
-
-export const StyledAdBrand = styled<{}, 'div'>('div')`
- font-family: ${p => p.theme.fontFamily.heading};
- font-weight: 600;
- padding-bottom: 2px;
-`
-
-export const StyledAdStatDiv = styled<{}, 'div'>('div')`
- margin-left: auto;
- height: 100%;
- display: flex;
- flex-direction: column;
- padding-top: 5px;
- padding-bottom: 5px;
-`
-
-export const StyledAdStat = styled<{}, 'div'>('div')`
- padding-left: 2px;
-`
-
-export const StyledAdStatActions = styled<{}, 'div'>('div')`
- margin-top: auto;
-`
-
-export const StyledCategoryContentDiv = styled<{}, 'div'>('div')`
- display: flex;
- flex-direction: column;
- height: 85px;
- min-width: 220px;
- padding: 15px;
-`
-
-export const StyledCategoryName = styled<{}, 'div'>('div')`
- font-size: 16px;
- font-weight: 600;
- margin: auto;
-`
-
-export const StyledCategoryActions = styled<{}, 'div'>('div')`
- margin: auto;
-`
-
-export const StyledNoAdHistoryDiv = styled<{}, 'div'>('div')`
- text-decoration: none;
- font-size: 16px;
- font-weight: 400;
- padding-top: 24px;
-`
-
-export const StyledTD = styled<{}, 'td'>('td')`
- width: 15%;
- border: 'none';
-`
diff --git a/src/features/rewards/tableContribute/__snapshots__/spec.tsx.snap b/src/features/rewards/tableContribute/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 16cd87cdb..000000000
--- a/src/features/rewards/tableContribute/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,20 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`TableContribute tests basic tests matches the snapshot 1`] = `
-.c0 {
- text-align: center;
- padding: 30px 0;
- color: #999ea2;
- font-size: 14px;
-}
-
-
-`;
diff --git a/src/features/rewards/tableContribute/index.tsx b/src/features/rewards/tableContribute/index.tsx
deleted file mode 100644
index eb685a682..000000000
--- a/src/features/rewards/tableContribute/index.tsx
+++ /dev/null
@@ -1,210 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledText,
- StyledRemove,
- StyledToggle,
- StyledTHOther,
- StyledTHLast,
- StyledToggleWrap,
- StyledLink
-} from './style'
-import Table, { Row } from '../../../components/dataTables/table'
-import Profile, { Provider } from '../profile'
-import { getLocale } from '../../../helpers'
-import { Tokens, Tooltip } from '../'
-import { CloseStrokeIcon, TrashOIcon } from '../../../components/icons'
-
-interface ProfileCell {
- verified: boolean
- name: string
- src: string
- provider?: Provider
-}
-
-export interface DetailRow {
- profile: ProfileCell
- attention: number
- url: string
- onRemove?: () => void
- token?: { value: string, converted: string }
-}
-
-export interface Props {
- header: string[]
- showRowAmount?: boolean
- showRemove?: boolean
- id?: string
- testId?: string
- children?: React.ReactNode
- headerColor?: boolean
- rows?: DetailRow[]
- numSites?: number
- allSites?: boolean
- onShowAll?: () => void
- numExcludedSites?: number
- isMobile?: boolean
- isExcluded?: boolean
-}
-
-export default class TableContribute extends React.PureComponent {
-
- getHeader = (header: string[]) => {
- if (!header) {
- return
- }
-
- if (this.props.showRemove) {
- header.push('')
- }
-
- let customStyle = {}
-
- if (this.props.headerColor) {
- customStyle = {
- border: 'none',
- 'border-bottom': `1px solid #9F22A1`,
- padding: '8px 0',
- color: '#9F22A1'
- }
- }
-
- return header.map((item: string, i: number) => {
- return {
- content: i === 0
- ? {item}
- : i === header.length - 1
- ? {item}
- : {item},
- customStyle
- }
- })
- }
-
- getRows = (rows?: DetailRow[]): Row[] | undefined => {
- if (!rows) {
- return
- }
-
- const { isExcluded } = this.props
-
- return rows.map((row: DetailRow): Row => {
- const cell: Row = {
- content: [
- {
- content: (
-
-
-
- )
- }
- ]
- }
-
- if (!isExcluded) {
- cell.content.push({
- content: (
-
- {row.attention}%
-
- )
- })
- }
-
- if (row.token) {
- cell.content.push({
- content: (
-
- ),
- customStyle: {
- textAlign: 'right',
- paddingRight: '10px'
- }
- })
- }
-
- if (this.props.showRemove) {
- const actionTooltip = isExcluded
- ? getLocale('restoreSite')
- : getLocale('excludeSite')
-
- cell.content.push({
- content: (
-
-
- {
- isExcluded
- ?
- :
- }
-
-
- ),
- customStyle: {
- textAlign: 'right'
- }
- })
- }
-
- if (this.props.showRowAmount) {
- if (this.props.showRemove) {
- const remaining = (100 - row.attention) / 1.04
- cell.customStyle = {
- background: `linear-gradient(
- to right,
- transparent 0%,
- transparent ${remaining}%,
- rgba(210, 198, 243, 0.39) ${remaining}%,
- rgba(210, 198, 243, 0.39) 100%,
- transparent 100%,
- transparent 100%
- )`
- }
- } else {
- const remaining = 100 - row.attention
- cell.customStyle = {
- background: `linear-gradient(90deg, transparent ${remaining}%, rgba(210, 198, 243, 0.39) ${row.attention}%)`
- }
- }
- }
-
- return cell
- })
- }
-
- render () {
- const { id, testId, header, children, rows, allSites, onShowAll } = this.props
- const numSites = this.props.numSites || 0
- const numExcludedSites = this.props.numExcludedSites || 0
-
- return (
-
-
- {
- !allSites && (numSites > 0 || numExcludedSites > 0)
- ?
- {getLocale('showAll')}
-
- : null
- }
-
- )
- }
-}
diff --git a/src/features/rewards/tableContribute/spec.tsx b/src/features/rewards/tableContribute/spec.tsx
deleted file mode 100644
index 8c99afd9c..000000000
--- a/src/features/rewards/tableContribute/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import TableContribute from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('TableContribute tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#table').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/tableContribute/style.ts b/src/features/rewards/tableContribute/style.ts
deleted file mode 100644
index 3fa493440..000000000
--- a/src/features/rewards/tableContribute/style.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-
-export const StyledText = styled<{}, 'div'>('div')`
- font-family: Muli, sans-serif;
- font-size: 14px;
- text-align: right;
- color: #686978;
-`
-
-export const StyledRemove = styled<{}, 'button'>('button')`
- margin: 0 8px;
- background: none;
- border: none;
- cursor: pointer;
- width: 16px;
- height: 16px;
- color: #9E9FAB;
- padding: 0;
-`
-
-export const StyledTHOther = styled<{}, 'div'>('div')`
- text-align: right;
-`
-
-export const StyledTHLast = styled(StyledTHOther)`
- padding-right: 10px;
-`
-
-export const StyledToggleWrap = styled<{}, 'div'>('div')`
- text-align: right;
-`
-
-export const StyledToggle = styled<{}, 'button'>('button')`
- font-family: Poppins, sans-serif;
- font-size: 13px;
- color: #4c54d2;
- text-transform: capitalize;
- background: none;
- border: none;
- padding: 0;
- cursor: pointer;
-`
-
-export const StyledLink = styled<{}, 'a'>('a')`
- text-decoration: none;
-`
diff --git a/src/features/rewards/tableDonation/__snapshots__/spec.tsx.snap b/src/features/rewards/tableDonation/__snapshots__/spec.tsx.snap
deleted file mode 100644
index b7a02537f..000000000
--- a/src/features/rewards/tableDonation/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,74 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`TableDonation tests basic tests matches the snapshot 1`] = `
-.c3 {
- text-align: center;
- padding: 30px 0;
- color: #999ea2;
- font-size: 14px;
-}
-
-.c0 {
- min-width: 100%;
- margin: 24px 0;
-}
-
-.c1 {
- text-transform: uppercase;
- text-align: left;
- font-family: Muli,sans-serif;
- font-size: 12px;
- font-weight: 500;
- border-bottom: 2px solid #dedfe4;
- border-top: 2px solid #dedfe4;
- color: #4B4C5C;
- padding: 12px 0;
-}
-
-.c2 {
- text-transform: uppercase;
- text-align: left;
- font-family: Muli,sans-serif;
- font-size: 12px;
- font-weight: 500;
- border-bottom: 2px solid #dedfe4;
- border-top: 2px solid #dedfe4;
- color: #4B4C5C;
- padding: 12px 0;
- text-align: right;
- padding-right: 7px;
-}
-
-
-
-
-
-
-
- MISSING: site
- |
-
- MISSING: type
- |
-
- MISSING: tokens
- |
-
-
-
-
-
-
-`;
diff --git a/src/features/rewards/tableDonation/index.tsx b/src/features/rewards/tableDonation/index.tsx
deleted file mode 100644
index 463ecd515..000000000
--- a/src/features/rewards/tableDonation/index.tsx
+++ /dev/null
@@ -1,181 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledType,
- StyledDate,
- StyledRemove,
- StyledRemoveIcon,
- StyledToggle,
- StyledToggleWrap,
- StyledLink
-} from './style'
-import Table, { Cell, Row } from '../../../components/dataTables/table/index'
-import Profile, { Provider } from '../profile/index'
-import Tokens from '../tokens/index'
-import { getLocale } from '../../../helpers'
-import { TrashIcon } from '../../../components/icons'
-
-interface ProfileCell {
- verified: boolean
- name: string
- src: string
- provider?: Provider
-}
-
-type DonationType = 'donation' | 'tip' | 'recurring'
-
-export interface DetailRow {
- profile: ProfileCell
- contribute: {
- tokens: string
- converted: string
- }
- url: string
- type: DonationType
- text?: string | React.ReactNode
- onRemove?: () => void
-}
-
-export interface Props {
- id?: string
- children?: React.ReactNode
- rows?: DetailRow[]
- numItems?: number
- allItems?: boolean
- onShowAll?: () => void
- headerColor?: boolean
-}
-
-export default class TableDonation extends React.PureComponent {
- getTypeContent (row: DetailRow): Cell {
- switch (row.type) {
- case 'recurring':
- return {
- content: (
- <>
- {getLocale('recurring')}
-
- {getLocale('remove')}
-
- >
- )
- }
- case 'donation':
- return {
- content: (
- <>
- {getLocale('oneTime')}
- {row.text}
- >
- )
- }
- case 'tip':
- return {
- content: (
- <>
- {getLocale('tipOnLike')}
- {row.text}
- >
- )
- }
- }
- }
-
- getRows (rows?: DetailRow[]): Row[] | undefined {
- if (!rows) {
- return
- }
-
- return rows.map((row: DetailRow): Row => {
- return {
- content: [
- {
- content: (
-
-
-
- )
- },
- this.getTypeContent(row),
- {
- content: (
-
- ),
- customStyle: {
- 'text-align': 'right',
- 'padding': '0 7px 0 10px',
- 'max-width': '80px'
- }
- }
- ]
- }
- })
- }
-
- get headers (): Cell[] {
- let customStyle = {}
-
- if (this.props.headerColor) {
- customStyle = {
- border: 'none',
- 'border-bottom': `1px solid #696FDC`,
- padding: '8px 0',
- color: '#696FDC'
- }
- }
-
- return [
- {
- content: getLocale('site'),
- customStyle
- },
- {
- content: getLocale('type'),
- customStyle
- },
- {
- content: getLocale('tokens'),
- customStyle: Object.assign({
- 'text-align': 'right',
- 'padding-right': '7px'
- }, customStyle)
- }
- ]
- }
-
- render () {
- const { id, children, rows, allItems, onShowAll } = this.props
- const numItems = this.props.numItems || 0
-
- return (
-
-
- {
- !allItems && numItems > 0
- ?
-
- {getLocale('seeAllItems', { numItems })}
-
-
- : null
- }
-
- )
- }
-}
diff --git a/src/features/rewards/tableDonation/spec.tsx b/src/features/rewards/tableDonation/spec.tsx
deleted file mode 100644
index 6e2b2a1d0..000000000
--- a/src/features/rewards/tableDonation/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import TableDonation from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('TableDonation tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#table').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/tableDonation/style.ts b/src/features/rewards/tableDonation/style.ts
deleted file mode 100644
index 42b0610c7..000000000
--- a/src/features/rewards/tableDonation/style.ts
+++ /dev/null
@@ -1,60 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-
-export const StyledRemove = styled<{}, 'button'>('button')`
- font-family: Muli, sans-serif;
- font-size: 14px;
- line-height: 0;
- height: 20px;
- color: #9E9FAB;
- padding: 0;
- border: none;
- background: none;
- cursor: pointer;
- display: inline-block;
-`
-
-export const StyledRemoveIcon = styled<{}, 'span'>('span')`
- vertical-align: middle;
- color: #9E9FAB;
- width: 12px;
- height: 12px;
- display: inline-block;
- margin-right: 4px;
-`
-
-export const StyledType = styled<{}, 'div'>('div')`
- font-family: Muli, sans-serif;
- font-size: 14px;
- font-weight: 600;
- color: #686978;
-`
-
-export const StyledDate = styled<{}, 'div'>('div')`
- font-family: Muli, sans-serif;
- font-size: 14px;
- line-height: 1;
- margin-top: 3px;
- color: #b8b9c4;
-`
-
-export const StyledToggle = styled<{}, 'button'>('button')`
- font-family: Poppins, sans-serif;
- font-size: 13px;
- color: #4c54d2;
- padding: 0;
- border: none;
- background: none;
- cursor: pointer;
-`
-
-export const StyledToggleWrap = styled<{}, 'div'>('div')`
- text-align: right;
-`
-
-export const StyledLink = styled<{}, 'a'>('a')`
- text-decoration: none;
-`
diff --git a/src/features/rewards/tablePending/__snapshots__/spec.tsx.snap b/src/features/rewards/tablePending/__snapshots__/spec.tsx.snap
deleted file mode 100644
index d59644521..000000000
--- a/src/features/rewards/tablePending/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,108 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`TableDonation tests basic tests matches the snapshot 1`] = `
-.c4 {
- text-align: center;
- padding: 30px 0;
- color: #999ea2;
- font-size: 14px;
-}
-
-.c0 {
- min-width: 100%;
- margin: 24px 0;
-}
-
-.c1 {
- text-transform: uppercase;
- text-align: left;
- font-family: Muli,sans-serif;
- font-size: 12px;
- font-weight: 500;
- border-bottom: 2px solid #dedfe4;
- border-top: 2px solid #dedfe4;
- color: #4B4C5C;
- padding: 12px 0;
- border: none;
- border-bottom: 1px solid #696FDC;
- padding: 0;
- color: #696FDC;
-}
-
-.c2 {
- text-transform: uppercase;
- text-align: left;
- font-family: Muli,sans-serif;
- font-size: 12px;
- font-weight: 500;
- border-bottom: 2px solid #dedfe4;
- border-top: 2px solid #dedfe4;
- color: #4B4C5C;
- padding: 12px 0;
- border: none;
- border-bottom: 1px solid #696FDC;
- padding: 0;
- color: #696FDC;
- text-align: right;
-}
-
-.c3 {
- text-transform: uppercase;
- text-align: left;
- font-family: Muli,sans-serif;
- font-size: 12px;
- font-weight: 500;
- border-bottom: 2px solid #dedfe4;
- border-top: 2px solid #dedfe4;
- color: #4B4C5C;
- padding: 12px 0;
- border: none;
- border-bottom: 1px solid #696FDC;
- padding: 0 10px;
- color: #696FDC;
- text-align: center;
-}
-
-
-
-
-
-
-
- MISSING: site
- |
-
- MISSING: type
- |
-
- MISSING: pendingUntil
- |
-
- MISSING: amount
- |
-
- MISSING: remove
- |
-
-
-
-
-
-
-`;
diff --git a/src/features/rewards/tablePending/index.tsx b/src/features/rewards/tablePending/index.tsx
deleted file mode 100644
index c3c0330ac..000000000
--- a/src/features/rewards/tablePending/index.tsx
+++ /dev/null
@@ -1,150 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledRemove,
- StyledRemoveIcon,
- StyledLink
-} from './style'
-import Table, { Cell, Row } from '../../../components/dataTables/table/index'
-import Profile, { Provider } from '../profile/index'
-import Tokens from '../tokens/index'
-import { getLocale } from '../../../helpers'
-import { TrashOIcon } from '../../../components/icons'
-
-interface ProfileCell {
- verified: boolean
- name: string
- src: string
- provider?: Provider
-}
-
-export type PendingType = 'tip' | 'ac' | 'recurring'
-
-export interface DetailRow {
- profile: ProfileCell
- amount: {
- tokens: string
- converted: string
- }
- url: string
- type: PendingType
- date: React.ReactNode
- onRemove: () => void
-}
-
-export interface Props {
- id?: string
- children?: React.ReactNode
- rows?: DetailRow[]
-}
-
-export default class TableDonation extends React.PureComponent {
- getRows (rows?: DetailRow[]): Row[] | undefined {
- if (!rows) {
- return
- }
-
- return rows.map((row: DetailRow): Row => {
- return {
- content: [
- {
- content: (
-
-
-
- )
- },
- {
- content: (
- <>{getLocale(`pendingType${row.type}`)}>
- )
- },
- {
- content: (
- <>{row.date}>
- )
- },
- {
- content: (
-
- ),
- customStyle: {
- 'text-align': 'right',
- 'padding': '0 7px 0 10px',
- 'max-width': '130px'
- }
- },
- {
- content: (
-
-
-
- )
- }
- ]
- }
- })
- }
-
- get headers (): Cell[] {
- const customStyle = {
- border: 'none',
- 'border-bottom': `1px solid #696FDC`,
- padding: '0',
- color: '#696FDC'
- }
-
- return [
- {
- content: getLocale('site'),
- customStyle
- },
- {
- content: getLocale('type'),
- customStyle
- },
- {
- content: getLocale('pendingUntil'),
- customStyle
- },
- {
- content: getLocale('amount'),
- customStyle: {...customStyle,
- 'text-align': 'right'
- }
- },
- {
- content: getLocale('remove'),
- customStyle: {...customStyle,
- 'text-align': 'center',
- padding: '0 10px'
- }
- }
- ]
- }
-
- render () {
- const { id, children, rows } = this.props
- return (
-
- )
- }
-}
diff --git a/src/features/rewards/tablePending/spec.tsx b/src/features/rewards/tablePending/spec.tsx
deleted file mode 100644
index 6e2b2a1d0..000000000
--- a/src/features/rewards/tablePending/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import TableDonation from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('TableDonation tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#table').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/tablePending/style.ts b/src/features/rewards/tablePending/style.ts
deleted file mode 100644
index 7c65f7b96..000000000
--- a/src/features/rewards/tablePending/style.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-import palette from '../../../theme/colors'
-
-export const StyledRemove = styled<{}, 'button'>('button')`
- padding: 0;
- border: none;
- background: none;
- cursor: pointer;
- text-align: center;
- width: 100%;
-`
-
-export const StyledRemoveIcon = styled<{}, 'span'>('span')`
- vertical-align: middle;
- color: ${palette.grey400};
- width: 20px;
- height: 20px;
- display: inline-block;
- margin-right: 4px;
-`
-export const StyledLink = styled<{}, 'a'>('a')`
- text-decoration: none;
-`
diff --git a/src/features/rewards/tableTransactions/__snapshots__/spec.tsx.snap b/src/features/rewards/tableTransactions/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 11554b463..000000000
--- a/src/features/rewards/tableTransactions/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,74 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`TableContribute tests basic tests matches the snapshot 1`] = `
-.c2 {
- text-align: right;
- padding-right: 14px;
-}
-
-.c3 {
- text-align: center;
- padding: 30px 0;
- color: #999ea2;
- font-size: 14px;
-}
-
-.c0 {
- min-width: 100%;
- margin: 24px 0;
-}
-
-.c1 {
- text-transform: uppercase;
- text-align: left;
- font-family: Muli,sans-serif;
- font-size: 12px;
- font-weight: 500;
- border-bottom: 2px solid #dedfe4;
- border-top: 2px solid #dedfe4;
- color: #4B4C5C;
- padding: 12px 0;
-}
-
-
-
-
-
-
-
- MISSING: date
- |
-
- MISSING: type
- |
-
- MISSING: description
- |
-
-
- MISSING: amount
-
- |
-
-
-
-
-
-
-`;
diff --git a/src/features/rewards/tableTransactions/index.tsx b/src/features/rewards/tableTransactions/index.tsx
deleted file mode 100644
index c6e3dcde9..000000000
--- a/src/features/rewards/tableTransactions/index.tsx
+++ /dev/null
@@ -1,121 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledTHLast,
- StyledType,
- StyledProvider
-} from './style'
-import Table, { Row } from '../../../components/dataTables/table/index'
-import { getLocale } from '../../../helpers'
-import Tokens, { Type as TokenType } from '../tokens'
-
-export type TransactionType = 'deposit' | 'tipOnLike' | 'donation' | 'contribute' | 'recurringDonation'
-
-type Description = string | { publisher: string, platform: string }
-
-export interface DetailRow {
- date: string
- type: TransactionType
- description: Description
- amount: { value: string, converted: string, isNegative?: boolean }
-}
-
-export interface Props {
- id?: string
- children?: React.ReactNode
- rows?: DetailRow[]
-}
-
-export default class TableTransactions extends React.PureComponent {
- private tokenColors: Record = {
- deposit: 'earnings',
- tipOnLike: 'donation',
- donation: 'donation',
- contribute: 'contribute',
- recurringDonation: 'donation'
- }
-
- getHeader = () => {
- const header: string[] = [
- getLocale('date'),
- getLocale('type'),
- getLocale('description'),
- getLocale('amount')
- ]
-
- return header.map((item: string, i: number) => {
- return {
- content: i === header.length - 1
- ? {item}
- : item
- }
- })
- }
-
- getDescription = (desc: Description) => {
- if (typeof desc === 'string') {
- return desc
- }
-
- return (
- <>
- {desc.publisher} {getLocale('on')} {desc.platform}
- >
- )
- }
-
- getRows = (rows?: DetailRow[]): Row[] | undefined => {
- if (!rows) {
- return
- }
-
- return rows.map((row: DetailRow): Row => {
- const cell: Row = {
- content: [
- {
- content: row.date
- },
- {
- content: {getLocale(row.type)}
- },
- {
- content: this.getDescription(row.description)
- },
- {
- content: (
-
- ),
- customStyle: {
- 'text-align': 'right',
- 'padding-right': '14px'
- }
- }
- ]
- }
- return cell
- })
- }
-
- render () {
- const { id, children, rows } = this.props
-
- return (
-
- )
- }
-}
diff --git a/src/features/rewards/tableTransactions/spec.tsx b/src/features/rewards/tableTransactions/spec.tsx
deleted file mode 100644
index 8c99afd9c..000000000
--- a/src/features/rewards/tableTransactions/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import TableContribute from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('TableContribute tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#table').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/tableTransactions/style.ts b/src/features/rewards/tableTransactions/style.ts
deleted file mode 100644
index 13ab74c48..000000000
--- a/src/features/rewards/tableTransactions/style.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled, { css } from 'styled-components'
-import { TransactionType } from './index'
-
-const colors: Record = {
- deposit: '#9f22a1',
- tipOnLike: '#696fdc',
- donation: '#696fdc',
- contribute: '#9752cb',
- recurringDonation: '#696fdc'
-}
-
-const getColor = (p: StyleProps) => {
- const color = colors[p.type]
-
- return css`
- --tableTransactions-type-color: ${color};
- `
-}
-
-interface StyleProps {
- type: TransactionType
-}
-
-export const StyledTHLast = styled<{}, 'div'>('div')`
- text-align: right;
- padding-right: 14px;
-`
-
-export const StyledProvider = styled<{}, 'span'>('span')`
- color: #9e9fab;
-`
-
-export const StyledType = styled('div')`
- ${getColor};
- color: var(--tableTransactions-type-color);
-`
diff --git a/src/features/rewards/thumbLikePicker/__snapshots__/spec.tsx.snap b/src/features/rewards/thumbLikePicker/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 22d81b8c2..000000000
--- a/src/features/rewards/thumbLikePicker/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,63 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Amount tests basic tests matches the snapshot 1`] = `
-Array [
- .c0 {
- display: inline-block;
- width: 32px;
- height: 32px;
- padding: 4px;
- cursor: pointer;
-}
-
-.c1 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-,
- .c0 {
- display: inline-block;
- width: 32px;
- height: 32px;
- margin-top: auto;
- padding: 4px;
- cursor: pointer;
-}
-
-.c1 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-,
-]
-`;
diff --git a/src/features/rewards/thumbLikePicker/index.tsx b/src/features/rewards/thumbLikePicker/index.tsx
deleted file mode 100644
index b9f8a91eb..000000000
--- a/src/features/rewards/thumbLikePicker/index.tsx
+++ /dev/null
@@ -1,81 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledAdStatThumbUpIcon,
- StyledAdStatThumbUpFilledIcon,
- StyledAdStatThumbDownIcon,
- StyledAdStatThumbDownFilledIcon
-} from './style'
-
-import {
- ThumbsupLIcon,
- ThumbsdownLIcon,
- ThumbsupSIcon,
- ThumbsdownSIcon
-} from '../../../components/icons'
-
-interface State {
- itemSelected: number
-}
-
-export interface Props {
- id?: string
- likeAction: number
- onThumbUpPress?: () => void
- onThumbDownPress?: () => void
-}
-
-export default class ThumbLikePicker extends React.PureComponent {
- constructor (props: Props) {
- super(props)
- this.state = {
- itemSelected: props.likeAction
- }
- }
-
- componentWillReceiveProps (nextProps: Props) {
- if ('likeAction' in nextProps) {
- this.setState({ itemSelected: nextProps.likeAction })
- }
- }
-
- render () {
- return (
- <>
- {
- this.state.itemSelected === 1 ?
- <>
-
-
-
-
-
-
- >
- :
- this.state.itemSelected === 2 ?
- <>
-
-
-
-
-
-
- >
- :
- <>
-
-
-
-
-
-
- >
- }
- >
- )
- }
-}
diff --git a/src/features/rewards/thumbLikePicker/spec.tsx b/src/features/rewards/thumbLikePicker/spec.tsx
deleted file mode 100644
index bda21a57b..000000000
--- a/src/features/rewards/thumbLikePicker/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import { TestThemeProvider } from '../../../theme'
-import ThumbLikePicker from './index';
-
-describe('Amount tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#thumbLikePicker').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/thumbLikePicker/style.ts b/src/features/rewards/thumbLikePicker/style.ts
deleted file mode 100644
index 6e4b9adff..000000000
--- a/src/features/rewards/thumbLikePicker/style.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License. v. 2.0. If a copy of the MPL was not distributed with this file.
-* You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-
-export const StyledAdStatThumbUpIcon = styled<{}, 'div'>('div')`
- display: inline-block;
- width: 32px;
- height: 32px;
- padding: 4px;
- cursor: pointer;
-`
-
-export const StyledAdStatThumbUpFilledIcon = styled(StyledAdStatThumbUpIcon)`
- color: ${p => p.theme.palette.red500};
-`
-
-export const StyledAdStatThumbDownIcon = styled<{}, 'div'>('div')`
- display: inline-block;
- width: 32px;
- height: 32px;
- margin-top: auto;
- padding: 4px;
- cursor: pointer;
-`
-
-export const StyledAdStatThumbDownFilledIcon = styled(StyledAdStatThumbDownIcon)`
- color: ${p => p.theme.palette.red500};
-`
diff --git a/src/features/rewards/tip/__snapshots__/spec.tsx.snap b/src/features/rewards/tip/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 2f263ee26..000000000
--- a/src/features/rewards/tip/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,315 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Tip tests basic tests matches the snapshot 1`] = `
-.c0 {
- border-radius: 8px;
- background-image: linear-gradient(148deg,#2825a7,#5465e8),linear-gradient(#696fdc,#696fdc);
- width: 214px;
- overflow: hidden;
- position: relative;
- padding: 16px 0 0;
- font-family: Poppins,sans-serif;
-}
-
-.c3 {
- font-size: 12px;
- line-height: 1.83;
- color: #fff;
- opacity: 0.6;
- padding-left: 23px;
-}
-
-.c10 {
- display: inline-block;
- margin-left: 33px;
- vertical-align: middle;
- padding-top: 2px;
-}
-
-.c9 {
- opacity: 0.65;
- font-size: 10px;
- line-height: 1.5;
- color: #fff;
-}
-
-.c1 {
- position: absolute;
- top: 12px;
- right: 12px;
- border: none;
- background: none;
- padding: 0;
- cursor: pointer;
- color: #DFDFE8;
- width: 20px;
- z-index: 2;
-}
-
-.c8 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- max-width: 160px;
- margin-bottom: 7px;
-}
-
-.c4 {
- position: relative;
- font-family: Muli,sans-serif;
- margin: 0px;
- --donate-content-padding: 0 0 0 23px;
- --donate-send-bg: #392dd1;
- --donate-send-color: #fff;
- --donate-send-padding: 11px 0 10px 47px;
- --donate-funds-padding: 12px 0 11px 25px;
-}
-
-.c5 {
- margin-top: 0px;
- padding: var(--donate-content-padding);
-}
-
-.c6 {
- font-size: 16px;
- font-weight: 600;
- line-height: 1.75;
- color: #fff;
- margin-bottom: 14px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- max-width: 167px;
- padding-left: 0px;
-}
-
-.c16 {
- background: var(--donate-send-bg);
- font-size: 13px;
- font-weight: 600;
- -webkit-letter-spacing: 0.2px;
- -moz-letter-spacing: 0.2px;
- -ms-letter-spacing: 0.2px;
- letter-spacing: 0.2px;
- color: var(--donate-send-color);
- padding: var(--donate-send-padding);
- text-transform: uppercase;
- border: none;
- width: 100%;
- text-align: left;
- cursor: pointer;
-}
-
-.c18 {
- display: block;
- border: none;
- font-size: 13px;
- font-weight: 600;
- text-transform: uppercase;
- background: var(--donate-send-bg);
- cursor: pointer;
-}
-
-.c17 {
- display: block;
- width: 245px;
- margin: 0 auto;
-}
-
-.c19 {
- vertical-align: middle;
- display: inline-block;
- margin-right: 15px;
- color: #a1a8f2;
- width: 27px;
- height: 27px;
-}
-
-.c7 {
- width: 100%;
- display: block;
-}
-
-.c2 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-.c20 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-.c11 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
-}
-
-.c13 {
- position: relative;
- display: block;
- height: 16px;
- width: 28px;
-}
-
-.c14 {
- background: #A7ACB2;
- height: 6px;
- margin-top: 5px;
- width: 100%;
- border-radius: 3px;
-}
-
-.c15 {
- position: relative;
- border-radius: 50%;
- -webkit-transition: all .4s ease;
- transition: all .4s ease;
- --toggle-bullet-size: 16px;
- --toggle-bullet-transform: translate(-1px,calc(-50% - 3px));
- --toggle-bullet-background: #CDD1D5;
- width: var(--toggle-bullet-size);
- height: var(--toggle-bullet-size);
- -webkit-transform: var(--toggle-bullet-transform);
- -ms-transform: var(--toggle-bullet-transform);
- transform: var(--toggle-bullet-transform);
- background-color: var(--toggle-bullet-background);
- box-shadow: 0 3px 3px rgba(0,0,0,0.05);
-}
-
-.c12 {
- color: #838391;
- font-size: 12px;
- font-family: Muli,sans-serif;
- text-align: right;
- -webkit-letter-spacing: 0.4px;
- -moz-letter-spacing: 0.4px;
- -ms-letter-spacing: 0.4px;
- letter-spacing: 0.4px;
- text-transform: uppercase;
- margin: 0px 8px 0 0;
- opacity: 1;
- -webkit-transition: 100ms ease-out;
- transition: 100ms ease-out;
-}
-
-
-
-
- Send my tip to
-
-
-
-
-
-
-
-
-
- MISSING: allowTip
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-`;
diff --git a/src/features/rewards/tip/index.tsx b/src/features/rewards/tip/index.tsx
deleted file mode 100644
index a893dd0f4..000000000
--- a/src/features/rewards/tip/index.tsx
+++ /dev/null
@@ -1,94 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledWrapper,
- StyledTitle,
- StyledAllowText,
- StyledClose,
- StyledAllowToggle,
- StyledTipWrapper
-} from './style'
-import Donate from '../donate'
-import Toggle from '../../../components/formControls/toggle'
-import { getLocale } from '../../../helpers'
-import { CloseCircleOIcon } from '../../../components/icons'
-
-type Donation = { tokens: string, converted: string, selected?: boolean }
-
-export interface Props {
- allow: boolean
- provider: string
- balance: string
- currentAmount: string
- donationAmounts: Donation[]
- onAmountSelection?: (tokens: string) => void
- onAllow: (allow: boolean) => void
- onDonate: (amount: string, allow: boolean) => void
- onClose: () => void
- id?: string
- title?: string
- addFundsLink?: string
-}
-
-export default class Tip extends React.PureComponent {
- static defaultProps = {
- title: ''
- }
-
- onDonate = (amount: string) => {
- if (this.props.onDonate) {
- this.props.onDonate(amount, this.props.allow)
- }
- }
-
- onToggle = () => {
- if (this.props.onAllow) {
- this.props.onAllow(!this.props.allow)
- }
- }
-
- onAmountChange = (tokens: string) => {
- if (this.props.onAmountSelection) {
- this.props.onAmountSelection(tokens)
- }
- }
-
- render () {
- const { id, title, balance, donationAmounts, allow, onClose, provider, currentAmount, addFundsLink } = this.props
-
- return (
-
-
-
-
- Send my tip to
-
-
- {getLocale('allowTip')} {provider}
-
-
-
-
-
-
- )
- }
-}
diff --git a/src/features/rewards/tip/spec.tsx b/src/features/rewards/tip/spec.tsx
deleted file mode 100644
index 0b0ba2447..000000000
--- a/src/features/rewards/tip/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import Tip from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('Tip tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#tip').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/tip/style.ts b/src/features/rewards/tip/style.ts
deleted file mode 100644
index fe3d411da..000000000
--- a/src/features/rewards/tip/style.ts
+++ /dev/null
@@ -1,56 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-
-export const StyledWrapper = styled<{}, 'div'>('div')`
- border-radius: 8px;
- background-image: linear-gradient(148deg, #2825a7, #5465e8), linear-gradient(#696fdc, #696fdc);
- width: 214px;
- overflow: hidden;
- position: relative;
- padding: 16px 0 0;
- font-family: Poppins, sans-serif;
-`
-
-export const StyledTitle = styled<{}, 'div'>('div')`
- font-size: 12px;
- line-height: 1.83;
- color: #fff;
- opacity: 0.6;
- padding-left: 23px;
-`
-
-export const StyledAllowToggle = styled<{}, 'span'>('span')`
- display: inline-block;
- margin-left: 33px;
- vertical-align: middle;
- padding-top: 2px;
-`
-
-export const StyledAllowText = styled<{}, 'span'>('span')`
- opacity: 0.65;
- font-size: 10px;
- line-height: 1.5;
- color: #fff;
-`
-
-export const StyledClose = styled<{}, 'button'>('button')`
- position: absolute;
- top: 12px;
- right: 12px;
- border: none;
- background: none;
- padding: 0;
- cursor: pointer;
- color: #DFDFE8;
- width: 20px;
- z-index: 2;
-`
-
-export const StyledTipWrapper = styled<{}, 'div'>('div')`
- display: flex;
- max-width: 160px;
- margin-bottom: 7px;
-`
diff --git a/src/features/rewards/toggleTips/__snapshots__/spec.tsx.snap b/src/features/rewards/toggleTips/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 0fb637237..000000000
--- a/src/features/rewards/toggleTips/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,246 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`ToggleTips tests basic tests matches the snapshot 1`] = `
-.c0 {
- background: #F5F5F9;
- display: block;
- width: 100%;
- padding: 10px 30px;
-}
-
-.c1 {
- color: #838391;
- font-size: 14px;
- font-weight: normal;
- -webkit-letter-spacing: 0;
- -moz-letter-spacing: 0;
- -ms-letter-spacing: 0;
- letter-spacing: 0;
- line-height: 28px;
- position: relative;
-}
-
-.c2 {
- color: #4C54D2;
- font-size: 14px;
- font-weight: 500;
- -webkit-letter-spacing: 0;
- -moz-letter-spacing: 0;
- -ms-letter-spacing: 0;
- letter-spacing: 0;
- line-height: 28px;
- margin-right: 5px;
-}
-
-.c3 {
- margin-right: 5px;
-}
-
-.c4 {
- margin-right: 5px;
- vertical-align: middle;
- width: 20px;
- height: 20px;
- margin-top: -3px;
- display: inline-block;
-}
-
-.c6 {
- font-weight: 600;
- margin-right: 5px;
-}
-
-.c9 {
- display: inline-block;
- vertical-align: middle;
- margin-top: 3px;
- text-align: right;
- position: absolute;
- right: 0px;
-}
-
-.c10 {
- float: right;
- margin-top: 2px;
-}
-
-.c7 {
- width: 20px;
- height: 20px;
- display: inline-block;
- margin-top: 3px;
- vertical-align: top;
-}
-
-.c8 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-.c5 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-.c11 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
-}
-
-.c13 {
- position: relative;
- display: block;
- height: 16px;
- width: 28px;
-}
-
-.c14 {
- background: #A7ACB2;
- height: 6px;
- margin-top: 5px;
- width: 100%;
- border-radius: 3px;
-}
-
-.c15 {
- position: relative;
- border-radius: 50%;
- -webkit-transition: all .4s ease;
- transition: all .4s ease;
- --toggle-bullet-size: 16px;
- --toggle-bullet-transform: translate(-1px,calc(-50% - 3px));
- --toggle-bullet-background: #CDD1D5;
- width: var(--toggle-bullet-size);
- height: var(--toggle-bullet-size);
- -webkit-transform: var(--toggle-bullet-transform);
- -ms-transform: var(--toggle-bullet-transform);
- transform: var(--toggle-bullet-transform);
- background-color: var(--toggle-bullet-background);
- box-shadow: 0 3px 3px rgba(0,0,0,0.05);
-}
-
-.c12 {
- color: #838391;
- font-size: 12px;
- font-family: Muli,sans-serif;
- text-align: right;
- -webkit-letter-spacing: 0.4px;
- -moz-letter-spacing: 0.4px;
- -ms-letter-spacing: 0.4px;
- letter-spacing: 0.4px;
- text-transform: uppercase;
- margin: 0px 8px 0 0;
- opacity: 1;
- -webkit-transition: 100ms ease-out;
- transition: 100ms ease-out;
-}
-
-
-
-
- MISSING: enableTips
-
-
- MISSING: on
-
-
-
-
-
- YOUTUBE
-
-
- MISSING: for
-
-
-
-
-
-
-
-`;
diff --git a/src/features/rewards/toggleTips/index.tsx b/src/features/rewards/toggleTips/index.tsx
deleted file mode 100644
index b95effc23..000000000
--- a/src/features/rewards/toggleTips/index.tsx
+++ /dev/null
@@ -1,106 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import { getLocale } from '../../../helpers'
-
-import {
- StyledEnableTipsSection,
- StyledEnableTipsInner,
- StyledText,
- StyledProviderImg,
- StyledEnableTips,
- StyledProviderName,
- StyledToggleOuter,
- StyledToggleInner,
- StyledThumbsUpIcon
-} from './style'
-import {
- RedditColorIcon,
- GitHubColorIcon,
- ThumbsUpIcon,
- TwitchColorIcon,
- TwitterColorIcon,
- VimeoColorIcon,
- YoutubeColorIcon
-} from '../../../components/icons'
-import { Toggle } from '../../../components'
-
-export type Provider = 'twitter' | 'youtube' | 'twitch' | 'reddit' | 'vimeo' | 'github'
-
-export interface Props {
- id?: string
- provider?: Provider
- onToggleTips: () => void
- tipsEnabled?: boolean
-}
-
-export default class ToggleTips extends React.PureComponent {
- getProviderImg (provider: Provider) {
- switch (provider) {
- case 'youtube':
- return
- case 'twitter':
- return
- case 'twitch':
- return
- case 'reddit':
- return
- case 'vimeo':
- return
- case 'github':
- return
- }
- }
-
- getProviderName (provider: Provider) {
- return provider.toUpperCase()
- }
-
- getProviderText (provider: Provider) {
- return `${this.getProviderName(provider)} ${getLocale('for')}`
- }
-
- render () {
- const { id, provider, onToggleTips, tipsEnabled } = this.props
-
- if (!provider) {
- return null
- }
-
- return (
-
-
-
- {getLocale('enableTips')}
-
-
- {getLocale('on')}
-
-
- {this.getProviderImg(provider)}
-
-
- {this.getProviderName(provider)}
-
-
- {getLocale('for')}
-
-
-
-
-
-
-
-
-
-
-
- )
- }
-}
diff --git a/src/features/rewards/toggleTips/spec.tsx b/src/features/rewards/toggleTips/spec.tsx
deleted file mode 100644
index 932b5c966..000000000
--- a/src/features/rewards/toggleTips/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import ToggleTips from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('ToggleTips tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#toggle-tips').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/toggleTips/style.ts b/src/features/rewards/toggleTips/style.ts
deleted file mode 100644
index c79886e5a..000000000
--- a/src/features/rewards/toggleTips/style.ts
+++ /dev/null
@@ -1,70 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-
-export const StyledEnableTipsSection = styled<{}, 'section'>('section')`
- background: #F5F5F9;
- display: block;
- width: 100%;
- padding: 10px 30px;
-` as any
-
-export const StyledEnableTipsInner = styled<{}, 'div'>('div')`
- color: #838391;
- font-size: 14px;
- font-weight: normal;
- letter-spacing: 0;
- line-height: 28px;
- position: relative;
-` as any
-
-export const StyledEnableTips = styled<{}, 'span'>('span')`
- color: #4C54D2;
- font-size: 14px;
- font-weight: 500;
- letter-spacing: 0;
- line-height: 28px;
- margin-right: 5px;
-` as any
-
-export const StyledText = styled<{}, 'span'>('span')`
- margin-right: 5px;
-` as any
-
-export const StyledProviderImg = styled<{}, 'span'>('span')`
- margin-right: 5px;
- vertical-align: middle;
- width: 20px;
- height: 20px;
- margin-top: -3px;
- display: inline-block;
-` as any
-
-export const StyledProviderName = styled<{}, 'span'>('span')`
- font-weight: 600;
- margin-right: 5px;
-` as any
-
-export const StyledToggleOuter = styled<{}, 'div'>('div')`
- display: inline-block;
- vertical-align: middle;
- margin-top: 3px;
- text-align: right;
- position: absolute;
- right: 0px;
-` as any
-
-export const StyledToggleInner = styled<{}, 'div'>('div')`
- float: right;
- margin-top: 2px;
-` as any
-
-export const StyledThumbsUpIcon = styled<{}, 'span'>('span')`
- width: 20px;
- height: 20px;
- display: inline-block;
- margin-top: 3px;
- vertical-align: top;
-` as any
diff --git a/src/features/rewards/tokens/__snapshots__/spec.tsx.snap b/src/features/rewards/tokens/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 1ded294e5..000000000
--- a/src/features/rewards/tokens/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,48 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Tokens tests basic tests matches the snapshot 1`] = `
-.c0 {
- --tokens-value-color: #4b4c5c;
- --tokens-text-size: 14px;
- --tokens-token-size: 14px;
- --tokens-tokenNum-size: 14px;
-}
-
-.c1 {
- display: inline-block;
-}
-
-.c2 {
- color: var(--tokens-value-color);
- font-size: var(--tokens-tokenNum-size);
-}
-
-.c3 {
- font-size: var(--tokens-token-size);
- display: inline-block;
- margin-left: 4px;
-}
-
-
-
-
-
- 10
-
-
- BAT
-
-
-
-`;
diff --git a/src/features/rewards/tokens/index.tsx b/src/features/rewards/tokens/index.tsx
deleted file mode 100644
index 161cf26aa..000000000
--- a/src/features/rewards/tokens/index.tsx
+++ /dev/null
@@ -1,55 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import { StyledWrapper, StyledTokens, StyledContent, StyledTokenValue, StyledTokenCurrency } from './style'
-
-export type Size = 'mini' | 'small' | 'normal'
-export type Type = 'contribute' | 'donation' | 'earnings' | 'default' | 'notPaid'
-
-export interface Props {
- value: string
- id?: string
- converted?: string
- currency?: string
- hideText?: boolean
- isNegative?: boolean
- size?: Size
- color?: Type
-}
-
-export default class Tokens extends React.PureComponent {
- static defaultProps = {
- size: 'normal',
- color: 'default',
- currency: 'USD',
- toFixed: 'true'
- }
-
- render () {
- const { id, converted, value, hideText, isNegative, size, color, currency } = this.props
-
- return (
-
-
-
- {isNegative ? '-' : ''}{value}
-
- {
- !hideText
- ? BAT
- : null
- }
-
- {
- converted !== undefined
- ?
- {converted} {currency}
-
- : null
- }
-
- )
- }
-}
diff --git a/src/features/rewards/tokens/spec.tsx b/src/features/rewards/tokens/spec.tsx
deleted file mode 100644
index 7de1c4bb2..000000000
--- a/src/features/rewards/tokens/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import Tokens from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('Tokens tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#tokens').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/tokens/style.ts b/src/features/rewards/tokens/style.ts
deleted file mode 100644
index f88f859e6..000000000
--- a/src/features/rewards/tokens/style.ts
+++ /dev/null
@@ -1,70 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled, { css } from 'styled-components'
-import { Props, Size, Type } from './index'
-
-const sizes: Record = {
- mini: {
- text: '14px',
- token: '14px',
- tokenNum: '14px'
- },
- small: {
- text: '14px',
- token: '14px',
- tokenNum: '14px'
- },
- normal: {
- text: '14px',
- token: '14px',
- tokenNum: '14px'
- }
-}
-
-const colors: Record = {
- contribute: '#9752cb',
- default: '#4b4c5c',
- donation: '#696fdc',
- earnings: '#c12d7c',
- notPaid: '#838391'
-}
-
-const getStyle = (p: Partial) => {
- const size = sizes[p.size || 'normal']
- const color = colors[p.color || 'default']
-
- return css`
- --tokens-value-color: ${color};
- --tokens-text-size: ${size.text};
- --tokens-token-size: ${size.token};
- --tokens-tokenNum-size: ${size.tokenNum};
- `
-}
-
-export const StyledWrapper = styled, 'span'>('span')`
- ${getStyle}
-`
-
-export const StyledTokens = styled<{}, 'span'>('span')`
- display: inline-block;
-`
-
-export const StyledTokenValue = styled<{}, 'span'>('span')`
- color: var(--tokens-value-color);
- font-size: var(--tokens-tokenNum-size);
-`
-
-export const StyledContent = styled<{}, 'span'>('span')`
- color: #9E9FAB;
- font-size: var(--tokens-text-size);
- display: inline-block;
- margin-left: 8px;
-`
-
-export const StyledTokenCurrency = styled<{}, 'span'>('span')`
- font-size: var(--tokens-token-size);
- display: inline-block;
- margin-left: 4px;
-`
diff --git a/src/features/rewards/tooltip/__snapshots__/spec.tsx.snap b/src/features/rewards/tooltip/__snapshots__/spec.tsx.snap
deleted file mode 100644
index e933473ab..000000000
--- a/src/features/rewards/tooltip/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,69 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Tooltip tests basic tests matches the snapshot 1`] = `
-.c0 {
- display: inline-block;
- position: relative;
-}
-
-.c1 {
- left: 50%;
- top: calc(100% + 10px);
- -webkit-transform: translateX(-50%);
- -ms-transform: translateX(-50%);
- transform: translateX(-50%);
- white-space: nowrap;
- position: absolute;
- background: #0C0D21;
- text-align: center;
- padding: 10px;
- z-index: 2;
- border-radius: 3px;
- box-shadow: 1px 1px 5px 0 rgba(34,35,38,0.43);
- display: none;
-}
-
-.c3 {
- color: #FFFFFF;
- font-family: Muli,sans-serif;
- font-weight: 300;
- font-size: 14px;
-}
-
-.c2 {
- width: 0;
- height: 0;
- border-style: solid;
- position: absolute;
- top: -7px;
- left: calc(50% - 7px);
- border-width: 0 7px 8px 7px;
- border-color: transparent transparent #0C0D21 transparent;
-}
-
-.c4 {
- cursor: pointer;
- height: 24px;
-}
-
-
-`;
diff --git a/src/features/rewards/tooltip/index.tsx b/src/features/rewards/tooltip/index.tsx
deleted file mode 100644
index f63342405..000000000
--- a/src/features/rewards/tooltip/index.tsx
+++ /dev/null
@@ -1,66 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this file,
-* You can obtain one at http://mozilla.org/MPL/2.0/.
-*/
-
-import * as React from 'react'
-import {
- StyledWrapper,
- StyledTooltip,
- StyledTooltipText,
- StyledPointer,
- StyledChildWrapper
-} from './style'
-
-export interface Props {
- id?: string
- content: React.ReactNode
- children?: React.ReactNode
- rightEdge?: boolean
-}
-
-interface State {
- displayed: boolean
-}
-
-export default class Tooltip extends React.PureComponent {
- constructor (props: Props) {
- super(props)
-
- this.state = {
- displayed: false
- }
- }
-
- onMouseEnter = () => {
- this.setState({ displayed: true })
- }
-
- onMouseLeave = () => {
- this.setState({ displayed: false })
- }
-
- render () {
- const { id, content, children, rightEdge } = this.props
-
- return (
-
-
-
-
- {content}
-
-
-
- {children}
-
-
- )
- }
-}
diff --git a/src/features/rewards/tooltip/spec.tsx b/src/features/rewards/tooltip/spec.tsx
deleted file mode 100644
index c275cf2ac..000000000
--- a/src/features/rewards/tooltip/spec.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this file,
-* You can obtain one at http://mozilla.org/MPL/2.0/.
-*/
-
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import Tooltip from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('Tooltip tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#tooltip').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/tooltip/style.ts b/src/features/rewards/tooltip/style.ts
deleted file mode 100644
index 9a770df45..000000000
--- a/src/features/rewards/tooltip/style.ts
+++ /dev/null
@@ -1,53 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this file,
-* You can obtain one at http://mozilla.org/MPL/2.0/.
-*/
-
-import styled from 'styled-components'
-
-interface StyleProps {
- displayed?: boolean
- rightEdge?: boolean
-}
-
-export const StyledWrapper = styled<{}, 'div'>('div')`
- display: inline-block;
- position: relative;
-`
-
-export const StyledTooltip = styled('div')`
- left: 50%;
- top: calc(100% + 10px);
- transform: ${p => p.rightEdge ? 'translateX(-80%);' : 'translateX(-50%);'};
- white-space: nowrap;
- position: absolute;
- background: #0C0D21;
- text-align: center;
- padding: 10px;
- z-index: 2;
- border-radius: 3px;
- box-shadow: 1px 1px 5px 0 rgba(34, 35, 38, 0.43);
- display: ${p => p.displayed ? 'inline-block' : 'none'};
-`
-export const StyledTooltipText = styled<{}, 'div'>('div')`
- color: #FFFFFF;
- font-family: Muli, sans-serif;
- font-weight: 300;
- font-size: 14px;
-`
-
-export const StyledPointer = styled('div')`
- width: 0;
- height: 0;
- border-style: solid;
- position: absolute;
- top: -7px;
- left: ${p => p.rightEdge ? 'calc(80% - 10px)' : 'calc(50% - 7px)'};
- border-width: 0 7px 8px 7px;
- border-color: transparent transparent #0C0D21 transparent;
-`
-
-export const StyledChildWrapper = styled<{}, 'div'>('div')`
- cursor: pointer;
- height: 24px;
-`
diff --git a/src/features/rewards/walletEmpty/__snapshots__/spec.tsx.snap b/src/features/rewards/walletEmpty/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 51ed087ef..000000000
--- a/src/features/rewards/walletEmpty/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,226 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`WalletEmpty tests basic tests matches the snapshot 1`] = `
-.c0 {
- padding-top: 32px;
- text-align: center;
- font-family: Poppins,sans-serif;
-}
-
-.c1 {
- font-size: 22px;
- font-weight: 300;
- line-height: 1.05;
- color: #999ea2;
- margin-top: 32px;
-}
-
-.c2 {
- font-family: Muli,sans-serif;
- font-size: 14px;
- line-height: 1.57;
- color: #999ea2;
- margin: 36px auto 31px;
- text-align: left;
- max-width: 250px;
- width: 100%;
-}
-
-.c2 b {
- font-weight: 600;
- color: #686978;
-}
-
-
-
-
- MISSING: rewardsPanelEmptyText1
-
-
-
- MISSING: rewardsPanelEmptyText2
-
-
- •
- MISSING: rewardsPanelEmptyText3
-
- •
- MISSING: rewardsPanelEmptyText4
-
- •
- MISSING: rewardsPanelEmptyText5
-
-
-`;
diff --git a/src/features/rewards/walletEmpty/assets/coins.tsx b/src/features/rewards/walletEmpty/assets/coins.tsx
deleted file mode 100644
index a225056ef..000000000
--- a/src/features/rewards/walletEmpty/assets/coins.tsx
+++ /dev/null
@@ -1,147 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this file,
-* You can obtain one at http://mozilla.org/MPL/2.0/.
-*/
-import * as React from 'react'
-
-export default (
-
-)
diff --git a/src/features/rewards/walletEmpty/index.tsx b/src/features/rewards/walletEmpty/index.tsx
deleted file mode 100644
index 129ac2a32..000000000
--- a/src/features/rewards/walletEmpty/index.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import { StyledWrapper, StyledTitle, StyledContent, StyledCenter } from './style'
-import { getLocale } from '../../../helpers'
-import coins from './assets/coins'
-
-interface Props {
- id?: string
- hideAddFundsText?: boolean
-}
-
-export default class WalletEmpty extends React.PureComponent {
- render () {
- const { id, hideAddFundsText } = this.props
-
- return (
-
- {coins}
- {getLocale('rewardsPanelEmptyText1')}
-
- {
- hideAddFundsText
- ?
- {getLocale('rewardsPanelEmptyText5')}
-
- : <>
- {getLocale('rewardsPanelEmptyText2')}
- • {getLocale('rewardsPanelEmptyText3')}
- • {getLocale('rewardsPanelEmptyText4')}
- • {getLocale('rewardsPanelEmptyText5')}
- >
- }
-
-
- )
- }
-}
diff --git a/src/features/rewards/walletEmpty/spec.tsx b/src/features/rewards/walletEmpty/spec.tsx
deleted file mode 100644
index 47af7ba21..000000000
--- a/src/features/rewards/walletEmpty/spec.tsx
+++ /dev/null
@@ -1,23 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import WalletEmpty from './index'
-
-describe('WalletEmpty tests', () => {
- const baseComponent = () =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#empty').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/walletEmpty/style.ts b/src/features/rewards/walletEmpty/style.ts
deleted file mode 100644
index 7543083dd..000000000
--- a/src/features/rewards/walletEmpty/style.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-
-export const StyledWrapper = styled<{}, 'div'>('div')`
- padding-top: 32px;
- text-align: center;
- font-family: Poppins, sans-serif;
-`
-
-export const StyledTitle = styled<{}, 'div'>('div')`
- font-size: 22px;
- font-weight: 300;
- line-height: 1.05;
- color: #999ea2;
- margin-top: 32px;
-`
-
-export const StyledContent = styled<{}, 'div'>('div')`
- font-family: Muli, sans-serif;
- font-size: 14px;
- line-height: 1.57;
- color: #999ea2;
- margin: 36px auto 31px;
- text-align: left;
- max-width: 250px;
- width: 100%;
-
- b {
- font-weight: 600;
- color: #686978;
- }
-`
-
-export const StyledCenter = styled<{}, 'div'>('div')`
- text-align: center;
-` as any
diff --git a/src/features/rewards/walletOff/__snapshots__/spec.tsx.snap b/src/features/rewards/walletOff/__snapshots__/spec.tsx.snap
deleted file mode 100644
index d38c1bdd6..000000000
--- a/src/features/rewards/walletOff/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,45 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`WalletOff tests basic tests matches the snapshot 1`] = `
-.c0 {
- padding: 32px 20px 46px;
- text-align: center;
- font-family: Poppins,sans-serif;
-}
-
-.c1 {
- font-size: 16px;
- font-weight: 500;
- line-height: 1.75;
- -webkit-letter-spacing: 0.1px;
- -moz-letter-spacing: 0.1px;
- -ms-letter-spacing: 0.1px;
- letter-spacing: 0.1px;
- text-align: center;
- color: #5bc4fe;
-}
-
-.c2 {
- font-family: Muli,sans-serif;
- font-size: 16px;
- line-height: 1.75;
- text-align: center;
- color: #686978;
-}
-
-
-
- MISSING: rewardsPanelOffText1
-
-
- MISSING: rewardsPanelOffText2
-
-
-`;
diff --git a/src/features/rewards/walletOff/index.tsx b/src/features/rewards/walletOff/index.tsx
deleted file mode 100644
index f30404215..000000000
--- a/src/features/rewards/walletOff/index.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import { StyledWrapper, StyledTitle, StyledContent } from './style'
-import { getLocale } from '../../../helpers'
-
-interface Props {
- id?: string
-}
-
-export default class WalletOff extends React.PureComponent {
- render () {
- return (
-
- {getLocale('rewardsPanelOffText1')}
- {getLocale('rewardsPanelOffText2')}
-
- )
- }
-}
diff --git a/src/features/rewards/walletOff/spec.tsx b/src/features/rewards/walletOff/spec.tsx
deleted file mode 100644
index a012fc7b3..000000000
--- a/src/features/rewards/walletOff/spec.tsx
+++ /dev/null
@@ -1,23 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import WalletOff from './index'
-
-describe('WalletOff tests', () => {
- const baseComponent = () =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#off').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/walletOff/style.ts b/src/features/rewards/walletOff/style.ts
deleted file mode 100644
index d6ff9c2f6..000000000
--- a/src/features/rewards/walletOff/style.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-
-export const StyledWrapper = styled<{}, 'div'>('div')`
- padding: 32px 20px 46px;
- text-align: center;
- font-family: Poppins, sans-serif;
-`
-
-export const StyledTitle = styled<{}, 'div'>('div')`
- font-size: 16px;
- font-weight: 500;
- line-height: 1.75;
- letter-spacing: 0.1px;
- text-align: center;
- color: #5bc4fe;
-`
-
-export const StyledContent = styled<{}, 'div'>('div')`
- font-family: Muli, sans-serif;
- font-size: 16px;
- line-height: 1.75;
- text-align: center;
- color: #686978;
-`
diff --git a/src/features/rewards/walletPanel/__snapshots__/spec.tsx.snap b/src/features/rewards/walletPanel/__snapshots__/spec.tsx.snap
deleted file mode 100644
index f5b5aa857..000000000
--- a/src/features/rewards/walletPanel/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,164 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`WalletPanel tests basic tests matches the snapshot 1`] = `
-.c0 {
- display: block;
-}
-
-.c2 {
- margin-bottom: 15px;
-}
-
-.c1 {
- min-height: 250px;
- padding: 15px 30px 20px 30px;
-}
-
-.c9 {
- text-align: center;
- padding: 15px 0 0;
- margin: 0 auto;
-}
-
-.c12 {
- display: none;
-}
-
-.c3 {
- position: relative;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- font-family: Muli,sans-serif;
-}
-
-.c4 {
- position: relative;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- height: 32px;
- width: 32px;
-}
-
-.c5 {
- max-width: 100%;
- max-height: 100%;
-}
-
-.c6 {
- padding: 0 0 0 12px;
-}
-
-.c7 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- font-size: 14px;
- font-weight: 700;
- color: #3b3e4f;
-}
-
-.c8 {
- font-size: 18px;
-}
-
-.c10 {
- width: 100%;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- color: white;
- font-size: 14px;
- border-radius: 28px;
- background: inherit;
- border: none;
- cursor: pointer;
- height: 40px;
- color: #4C54D2;
- border-radius: 20px;
- font-size: 12px;
- border: 1px solid #A1A8F2;
-}
-
-.c10:focus {
- outline: 0;
-}
-
-.c11 {
- font-family: Poppins,sans-serif;
- font-weight: 600;
- text-transform: uppercase;
- -webkit-letter-spacing: 0.39px;
- -moz-letter-spacing: 0.39px;
- -ms-letter-spacing: 0.39px;
- letter-spacing: 0.39px;
- margin: 0 auto;
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-`;
diff --git a/src/features/rewards/walletPanel/index.tsx b/src/features/rewards/walletPanel/index.tsx
deleted file mode 100644
index 9c362667c..000000000
--- a/src/features/rewards/walletPanel/index.tsx
+++ /dev/null
@@ -1,244 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-
-// Helpers
-import { getLocale } from '../../../helpers'
-
-// Styled Components
-import {
- StyledWrapper,
- StyledAttentionScore,
- StyledAttentionScoreTitle,
- StyledContainer,
- StyledScoreWrapper,
- StyledControlsWrapper,
- StyledDonateText,
- StyledDonateWrapper,
- StyledToggleWrapper,
- StyledSelectWrapper,
- StyledGrid,
- StyledColumn,
- StyleToggleTips,
- StyledNoticeWrapper,
- StyledNoticeLink,
- StyledOptionShown,
- StyledProfileWrapper,
- StyledSelect
-} from './style'
-
-// Components
-import { Toggle } from '../../../components'
-
-import { RewardsButton } from '../'
-import ToggleTips from '../toggleTips/index'
-import Profile, { Provider } from '../profile/index'
-
-export type Token = {
- tokens: string
- converted: string
-}
-
-export interface Props {
- id?: string
- platform?: Provider
- publisherImg?: string
- publisherName?: string
- isVerified?: boolean
- attentionScore?: string | null
- tipsEnabled: boolean
- includeInAuto: boolean
- monthlyAmount: string
- donationAmounts?: Token[]
- toggleTips?: boolean
- donationAction: () => void
- onToggleTips: () => void
- onAmountChange: (event: React.ChangeEvent) => void
- onIncludeInAuto: () => void
- onRefreshPublisher?: () => void
- refreshingPublisher?: boolean
- publisherRefreshed?: boolean
- showUnVerified?: boolean
- moreLink?: string
- acEnabled?: boolean
-}
-
-export default class WalletPanel extends React.PureComponent {
- publisherInfo () {
- const publisherTitle = this.props.publisherName || ''
-
- return (
-
-
-
- )
- }
-
- donationDropDown () {
- const { donationAmounts } = this.props
- const monthlyAmount = this.props.monthlyAmount || '5.0'
-
- if (!donationAmounts) {
- return null
- }
-
- return (
-
-
- {donationAmounts.map((token: Token, index: number) => {
- return (
-
- )
- }).concat(
-
- {monthlyAmount} {getLocale('bat')}
-
- )}
-
-
- )
- }
-
- donationControls () {
- const { donationAmounts, acEnabled } = this.props
-
- if (!donationAmounts && !acEnabled) {
- return null
- }
-
- return (
-
- {
- acEnabled
- ?
-
- {getLocale('includeInAuto')}
-
-
-
-
-
-
-
- : null
- }
- {
- donationAmounts
- ?
-
- {getLocale('donateMonthly')}
-
- {this.donationDropDown()}
-
- : null
- }
-
- )
- }
-
- render () {
- const {
- id,
- platform,
- onToggleTips,
- attentionScore,
- tipsEnabled,
- donationAction,
- toggleTips,
- showUnVerified,
- isVerified,
- moreLink,
- acEnabled
- } = this.props
-
- const donationControls = this.donationControls()
-
- return (
-
-
- {this.publisherInfo()}
- {
- showUnVerified
- ?
- {getLocale(isVerified ? 'connectedText' : 'unVerifiedText')}
- {' '}
-
- {' '}
- {getLocale('unVerifiedTextMore')}
-
-
- : null
- }
- {
- acEnabled
- ?
-
-
-
- {getLocale('rewardsContributeAttentionScore')}
-
-
-
- {attentionScore}%
-
-
-
- : null
- }
- {
- donationControls
- ?
- {donationControls}
-
- : null
- }
-
-
-
-
-
-
-
-
- )
- }
-}
diff --git a/src/features/rewards/walletPanel/spec.tsx b/src/features/rewards/walletPanel/spec.tsx
deleted file mode 100644
index ad3136567..000000000
--- a/src/features/rewards/walletPanel/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import WalletPanel from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('WalletPanel tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#wallet-panel').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/walletPanel/style.ts b/src/features/rewards/walletPanel/style.ts
deleted file mode 100644
index d06684c84..000000000
--- a/src/features/rewards/walletPanel/style.ts
+++ /dev/null
@@ -1,129 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-import palette from '../../../theme/colors'
-
-interface StyleProps {
- size?: string
- toggleTips?: boolean
-}
-
-export const StyledWrapper = styled<{}, 'div'>('div')`
- display: block;
-` as any
-
-export const StyledProfileWrapper = styled<{}, 'div'>('div')`
- margin-bottom: 15px;
-` as any
-
-export const StyledContainer = styled<{}, 'div'>('div')`
- min-height: 250px;
- padding: 15px 30px 20px 30px;
-` as any
-
-export const StyledAttentionScore = styled<{}, 'span'>('span')`
- margin-left: 30px;
- font-weight: 500;
- color: #4B4C5C;
- font-size: 14px;
-` as any
-
-export const StyledAttentionScoreTitle = styled<{}, 'span'>('span')`
- font-weight: 400;
- color: #4B4C5C;
- font-size: 14px;
- letter-spacing: 0;
- margin: 0 0 0 2px;
-` as any
-
-export const StyledScoreWrapper = styled<{}, 'section'>('section')`
- padding: 0 0px 6px;
-` as any
-
-export const StyledControlsWrapper = styled<{}, 'section'>('section')`
- padding: 5px 0px;
- border-top: 1px solid #DBDFE3;
- border-bottom: 1px solid #DBDFE3;
-` as any
-
-export const StyledDonateText = styled<{}, 'span'>('span')`
- display: inline-block;
- font-size: 14px;
- font-weight: normal;
- letter-spacing: 0;
- line-height: 26px;
- margin-left: 2px;
- color: ${p => p.theme.color.subtleInteracting};
-` as any
-
-export const StyledDonateWrapper = styled<{}, 'div'>('div')`
- text-align: center;
- padding: 15px 0 0;
- margin: 0 auto;
-` as any
-
-export const StyledToggleWrapper = styled<{}, 'div'>('div')`
- margin-top: 6px;
-` as any
-
-export const StyledSelectWrapper = styled<{}, 'div'>('div')`
- width: 87px;
- margin: 2px 0px 0px;
-` as any
-
-export const StyledGrid = styled<{}, 'div'>('div')`
- display: flex;
- flex-direction: row;
-`
-
-export const StyledColumn = styled('div')`
- flex: ${p => p.size} 0 0;
-`
-
-export const StyleToggleTips = styled('div')`
- display: ${p => p.toggleTips ? 'flex' : 'none'};
-`
-
-export const StyledNoticeWrapper = styled('div')`
- background: rgba(0, 0, 0, 0.04);
- color: #676283;
- font-size: 12px;
- font-family: ${p => p.theme.fontFamily.body};
- font-weight: normal;
- letter-spacing: 0;
- line-height: 16px;
- padding: 10px 12px;
- border-radius: 4px;
- margin: 11px 0 10px;
- max-height: 84px;
- overflow-y: auto;
-`
-
-export const StyledNoticeLink = styled('a')`
- color: ${palette.blue400};
- font-weight: bold;
- text-decoration: none;
- display: inline-block;
-`
-
-export const StyledSelect = styled('select')`
- width: 100%;
- background: inherit;
- height: 34px;
- font-size: 14px;
- border: none;
- text-align: right;
- color: ${palette.blurple500};
- font-family: Poppins, sans-serif;
- max-height: 20px;
-
- &:focus {
- outline: 0;
- }
-`
-
-export const StyledOptionShown = styled<{}, 'option'>('option')`
- display: none;
-`
diff --git a/src/features/rewards/walletPanelDisabled/__snapshots__/spec.tsx.snap b/src/features/rewards/walletPanelDisabled/__snapshots__/spec.tsx.snap
deleted file mode 100644
index f29deb8a4..000000000
--- a/src/features/rewards/walletPanelDisabled/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,258 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`DisabledPanel tests basic tests matches the snapshot 1`] = `
-.c0 {
- text-align: center;
- font-family: Poppins,sans-serif;
- margin-top: 7px;
- padding-bottom: 20px;
- background: linear-gradient(-180deg,rgba(255,255,255,1) 0%,rgba(233,235,255,1) 99%);
-}
-
-.c1 {
- display: block;
- margin: -10px auto 0px;
- width: 150px;
- height: 115px;
- padding: 20px 0 15px;
-}
-
-.c3 {
- color: #4B4C5C;
- font-size: 28px;
- font-weight: normal;
- -webkit-letter-spacing: 0;
- -moz-letter-spacing: 0;
- -ms-letter-spacing: 0;
- letter-spacing: 0;
- line-height: 22px;
- display: block;
-}
-
-.c4 {
- color: #4C54D2;
- font-size: 18px;
- font-weight: 600;
- text-align: center;
- -webkit-letter-spacing: -0.23px;
- -moz-letter-spacing: -0.23px;
- -ms-letter-spacing: -0.23px;
- letter-spacing: -0.23px;
- line-height: 22px;
- display: block;
- margin: 10px 0px 5px;
-}
-
-.c5 {
- display: block;
- color: #4B4C5C;
- font-size: 16px;
- font-weight: normal;
- -webkit-letter-spacing: 0;
- -moz-letter-spacing: 0;
- -ms-letter-spacing: 0;
- letter-spacing: 0;
- line-height: 24px;
- width: 285px;
- margin: 0 auto;
- font-family: Muli,sans-serif;
-}
-
-.c10 {
- top: 2px;
- position: relative;
- font-weight: 600;
-}
-
-.c6 {
- width: 269px;
- margin: 18px auto 15px;
-}
-
-.c13 {
- color: #4A4A4A;
- font-size: 14px;
- font-weight: normal;
- text-align: center;
- -webkit-letter-spacing: 0;
- -moz-letter-spacing: 0;
- -ms-letter-spacing: 0;
- letter-spacing: 0;
- line-height: 18px;
- width: 290px;
- margin: 0 auto;
- display: block;
- font-family: Muli,sans-serif;
-}
-
-.c14 {
- cursor: pointer;
- color: #73CBFF;
- font-weight: 500;
-}
-
-.c12 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-.c11 {
- -webkit-transform: rotate(180deg);
- -ms-transform: rotate(180deg);
- transform: rotate(180deg);
-}
-
-.c2 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-.c7 {
- width: 100%;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- color: white;
- font-size: 14px;
- border-radius: 28px;
- background: inherit;
- border: none;
- cursor: pointer;
- height: 40px;
- color: #4C54D2;
- border-radius: 20px;
- font-size: 12px;
- border: 1px solid #A1A8F2;
-}
-
-.c7:focus {
- outline: 0;
-}
-
-.c8 {
- font-family: Poppins,sans-serif;
- font-weight: 600;
- text-transform: uppercase;
- -webkit-letter-spacing: 0.39px;
- -moz-letter-spacing: 0.39px;
- -ms-letter-spacing: 0.39px;
- letter-spacing: 0.39px;
- margin: -3px auto 0px;
-}
-
-.c9 {
- display: inline-block;
- line-height: 0;
- height: 18px;
- width: 18px;
- vertical-align: bottom;
- margin: 0 -4px 0 6px;
-}
-
-
-
-
-
-
- MISSING: welcomeBack
-
-
- MISSING: braveRewardsSubTitle
-
-
- MISSING: disabledPanelTextTwo
-
-
-
-
-
- MISSING: serviceText
-
-
- MISSING: termsOfService
-
-
- MISSING: and
-
-
- MISSING: privacyPolicy
-
- .
-
-
-`;
diff --git a/src/features/rewards/walletPanelDisabled/index.tsx b/src/features/rewards/walletPanelDisabled/index.tsx
deleted file mode 100644
index 8a314f322..000000000
--- a/src/features/rewards/walletPanelDisabled/index.tsx
+++ /dev/null
@@ -1,64 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this file,
-* You can obtain one at http://mozilla.org/MPL/2.0/.
-*/
-
-import * as React from 'react'
-
-import {
- StyledWrapper,
- StyledBatLogo,
- StyledTitle,
- StyledSubTitle,
- StyledText,
- StyledServiceText,
- StyledArrowIcon,
- StyledButtonWrapper,
- StyledServiceLink
-} from './style'
-import { RewardsButton } from '../'
-import { ArrowRightIcon, BatColorIcon } from '../../../components/icons'
-
-import { getLocale } from '../../../helpers'
-
-export interface Props {
- onEnable: () => void
- onTOSClick: () => void
- onPrivacyClick: () => void
-}
-
-export default class WalletPanelDisabled extends React.PureComponent {
-
- render () {
- const { onEnable, onTOSClick, onPrivacyClick } = this.props
-
- return (
-
-
-
-
-
- {getLocale('welcomeBack')}
-
-
- {getLocale('braveRewardsSubTitle')}
-
-
- {getLocale('disabledPanelTextTwo')}
-
-
- }
- />
-
-
- {getLocale('serviceText')} {getLocale('termsOfService')} {getLocale('and')} {getLocale('privacyPolicy')}.
-
-
- )
- }
-}
diff --git a/src/features/rewards/walletPanelDisabled/spec.tsx b/src/features/rewards/walletPanelDisabled/spec.tsx
deleted file mode 100644
index ee4659488..000000000
--- a/src/features/rewards/walletPanelDisabled/spec.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this file,
-* You can obtain one at http://mozilla.org/MPL/2.0/.
-*/
-
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import WalletPanelDisabled from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('DisabledPanel tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#disabled-panel-optin').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/walletPanelDisabled/style.ts b/src/features/rewards/walletPanelDisabled/style.ts
deleted file mode 100644
index a9da31efd..000000000
--- a/src/features/rewards/walletPanelDisabled/style.ts
+++ /dev/null
@@ -1,84 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this file,
-* You can obtain one at http://mozilla.org/MPL/2.0/.
-*/
-
-import styled from 'styled-components'
-
-export const StyledWrapper = styled<{}, 'div'>('div')`
- text-align: center;
- font-family: Poppins, sans-serif;
- margin-top: 7px;
- padding-bottom: 20px;
- background: linear-gradient(-180deg, rgba(255,255,255,1) 0%, rgba(233, 235, 255,1) 99%);
-` as any
-
-export const StyledBatLogo = styled<{}, 'span'>('span')`
- display: block;
- margin: -10px auto 0px;
- width: 150px;
- height: 115px;
- padding: 20px 0 15px;
-` as any
-
-export const StyledTitle = styled<{}, 'span'>('span')`
- color: #4B4C5C;
- font-size: 28px;
- font-weight: normal;
- letter-spacing: 0;
- line-height: 22px;
- display: block;
-` as any
-
-export const StyledSubTitle = styled<{}, 'span'>('span')`
- color: #4C54D2;
- font-size: 18px;
- font-weight: 600;
- text-align: center;
- letter-spacing: -0.23px;
- line-height: 22px;
- display: block;
- margin: 10px 0px 5px;
-` as any
-
-export const StyledText = styled<{}, 'span'>('span')`
- display: block;
- color: #4B4C5C;
- font-size: 16px;
- font-weight: normal;
- letter-spacing: 0;
- line-height: 24px;
- width: 285px;
- margin: 0 auto;
- font-family: Muli, sans-serif;
-` as any
-
-export const StyledArrowIcon = styled<{}, 'span'>('span')`
- top: 2px;
- position: relative;
- font-weight: 600;
-` as any
-
-export const StyledButtonWrapper = styled<{}, 'div'>('div')`
- width: 269px;
- margin: 18px auto 15px;
-` as any
-
-export const StyledServiceText = styled<{}, 'span'>('span')`
- color: #4A4A4A;
- font-size: 14px;
- font-weight: normal;
- text-align: center;
- letter-spacing: 0;
- line-height: 18px;
- width: 290px;
- margin: 0 auto;
- display: block;
- font-family: Muli, sans-serif;
-` as any
-
-export const StyledServiceLink = styled<{}, 'a'>('a')`
- cursor: pointer;
- color: #73CBFF;
- font-weight: 500;
-` as any
diff --git a/src/features/rewards/walletPopup/__snapshots__/spec.tsx.snap b/src/features/rewards/walletPopup/__snapshots__/spec.tsx.snap
deleted file mode 100644
index d84783e3d..000000000
--- a/src/features/rewards/walletPopup/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,88 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`WalletSummary tests basic tests matches the snapshot 1`] = `
-.c0 {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100vh;
- background: rgba(0,0,0,0);
- z-index: 99;
- padding: 0 20px;
- overflow: hidden;
-}
-
-.c1 {
- margin: 52px auto;
- background: #FFFFFF;
- border-radius: 6px;
- overflow: hidden;
- position: relative;
- box-shadow: 0 0 12px 0 rgba(12,13,33,0.44);
-}
-
-.c2 {
- padding: 20px;
-}
-
-.c3 {
- font-weight: bold;
- border-bottom: 1px solid #c2c4cf;
- padding-bottom: 5px;
- margin-bottom: 10px;
-}
-
-.c4 {
- vertical-align: middle;
- display: inline-block;
- width: 24px;
- height: 24px;
- margin-left: -5px;
-}
-
-.c5 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-
-`;
diff --git a/src/features/rewards/walletPopup/index.tsx b/src/features/rewards/walletPopup/index.tsx
deleted file mode 100644
index 0ce7dc847..000000000
--- a/src/features/rewards/walletPopup/index.tsx
+++ /dev/null
@@ -1,68 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-
-// Helpers
-import { getLocale } from '../../../helpers'
-
-// Styled Components
-import {
- StyledContent,
- StyledDialog,
- StyledHeader,
- StyledIcon,
- StyledStatus,
- StyledWrapper
-} from './style'
-import {
- UpholdColorIcon
-} from '../../../components/icons'
-
-export interface Props {
- children: React.ReactNode
- onClose: () => void
- userName: string
- id?: string
- verified?: boolean
-}
-
-export default class WalletPopup extends React.PureComponent {
- insideClick = (e: React.SyntheticEvent) => {
- // Don't propogate click to container, which will close it
- e.stopPropagation()
- }
-
- render () {
- const {
- children,
- onClose,
- userName,
- id,
- verified
- } = this.props
- return (
-
-
-
-
-
-
-
- {userName}
- {
- verified
- ?
- {getLocale('walletVerified')}
-
- : null
- }
-
- {children}
-
-
-
- )
- }
-}
diff --git a/src/features/rewards/walletPopup/spec.tsx b/src/features/rewards/walletPopup/spec.tsx
deleted file mode 100644
index 42d5a1025..000000000
--- a/src/features/rewards/walletPopup/spec.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import WalletPopup, { Props } from './index'
-import { TestThemeProvider } from '../../../theme'
-
-const props = {
- onClose: () => null,
- userName: 'tester',
-}
-
-describe('WalletSummary tests', () => {
- const baseComponent = (props: Props) =>
-
-
-
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent(props)
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent(props))
- const assertion = wrapper.find('#wallet-popup').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/walletPopup/style.ts b/src/features/rewards/walletPopup/style.ts
deleted file mode 100644
index 5a06abb68..000000000
--- a/src/features/rewards/walletPopup/style.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-
-export const StyledWrapper = styled<{}, 'div'>('div')`
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100vh;
- background: rgba(0, 0, 0, 0);
- z-index: 99;
- padding: 0 20px;
- overflow: hidden;
-`
-
-export const StyledDialog = styled<{}, 'div'>('div')`
- margin: 52px auto;
- background: ${p => p.theme.palette.white};
- border-radius: 6px;
- overflow: hidden;
- position: relative;
- box-shadow: 0 0 12px 0 rgba(12, 13, 33, 0.44);
-`
-
-export const StyledContent = styled<{}, 'div'>('div')`
- padding: 20px;
-`
-
-export const StyledHeader = styled<{}, 'div'>('div')`
- font-weight: bold;
- border-bottom: 1px solid ${p => p.theme.palette.grey400};
- padding-bottom: 5px;
- margin-bottom: 10px;
-`
-
-export const StyledStatus = styled<{}, 'div'>('div')`
- font-weight: normal;
- float: right;
- color: ${p => p.theme.palette.green600};
-`
-
-export const StyledIcon = styled<{}, 'span'>('span')`
- vertical-align: middle;
- display: inline-block;
- width: 24px;
- height: 24px;
- margin-left: -5px;
-`
diff --git a/src/features/rewards/walletSummary/__snapshots__/spec.tsx.snap b/src/features/rewards/walletSummary/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 3f23d6f85..000000000
--- a/src/features/rewards/walletSummary/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,429 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`WalletSummary tests basic tests matches the snapshot 1`] = `
-.c0 {
- min-height: 305px;
- padding: 0px;
- background: inherit;
-}
-
-.c1 {
- padding: 25px 14px 14px;
- font-family: Poppins,sans-serif;
-}
-
-.c2 {
- font-size: 14px;
- font-weight: 600;
- line-height: 1.57;
- -webkit-letter-spacing: 0.4px;
- -moz-letter-spacing: 0.4px;
- -ms-letter-spacing: 0.4px;
- letter-spacing: 0.4px;
- color: #a1a8f2;
- text-transform: uppercase;
-}
-
-.c3 {
- font-size: 22px;
- font-weight: 300;
- line-height: 0.79;
- -webkit-letter-spacing: 0.4px;
- -moz-letter-spacing: 0.4px;
- -ms-letter-spacing: 0.4px;
- letter-spacing: 0.4px;
- color: #4C54D2;
- margin: 4px 0 26px;
- text-transform: uppercase;
-}
-
-.c14 {
- font-size: 12px;
- color: #686978;
- margin-top: 26px;
- text-align: center;
- padding: 0;
- border: none;
- background: none;
- width: 100%;
- cursor: pointer;
-}
-
-.c15 {
- vertical-align: middle;
- margin-right: 11px;
- width: 22px;
- height: 24px;
- color: #A1A8F2;
- display: inline-block;
-}
-
-.c4 {
- position: relative;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- border-bottom: 1px solid #d0d6dc;
- border-top: none;
- -webkit-box-pack: justify;
- -webkit-justify-content: space-between;
- -ms-flex-pack: justify;
- justify-content: space-between;
- -webkit-align-items: baseline;
- -webkit-box-align: baseline;
- -ms-flex-align: baseline;
- align-items: baseline;
- -webkit-align-content: flex-start;
- -ms-flex-line-pack: start;
- align-content: flex-start;
- -webkit-flex-wrap: nowrap;
- -ms-flex-wrap: nowrap;
- flex-wrap: nowrap;
- font-family: Muli,sans-serif;
-}
-
-.c5 {
- font-size: 14px;
- line-height: 2.79;
- color: #4b4c5c;
- -webkit-box-flex: 1;
- -webkit-flex-grow: 1;
- -ms-flex-positive: 1;
- flex-grow: 1;
- -webkit-flex-shrink: 1;
- -ms-flex-negative: 1;
- flex-shrink: 1;
- -webkit-flex-basis: 60%;
- -ms-flex-preferred-size: 60%;
- flex-basis: 60%;
-}
-
-.c6 {
- -webkit-box-flex: 1;
- -webkit-flex-grow: 1;
- -ms-flex-positive: 1;
- flex-grow: 1;
- -webkit-flex-shrink: 1;
- -ms-flex-negative: 1;
- flex-shrink: 1;
- -webkit-flex-basis: 40%;
- -ms-flex-preferred-size: 40%;
- flex-basis: 40%;
- text-align: right;
-}
-
-.c7 {
- --tokens-value-color: #c12d7c;
- --tokens-text-size: 14px;
- --tokens-token-size: 14px;
- --tokens-tokenNum-size: 14px;
-}
-
-.c12 {
- --tokens-value-color: #9752cb;
- --tokens-text-size: 14px;
- --tokens-token-size: 14px;
- --tokens-tokenNum-size: 14px;
-}
-
-.c13 {
- --tokens-value-color: #696fdc;
- --tokens-text-size: 14px;
- --tokens-token-size: 14px;
- --tokens-tokenNum-size: 14px;
-}
-
-.c8 {
- display: inline-block;
-}
-
-.c9 {
- color: var(--tokens-value-color);
- font-size: var(--tokens-tokenNum-size);
-}
-
-.c11 {
- color: #9E9FAB;
- font-size: var(--tokens-text-size);
- display: inline-block;
- margin-left: 8px;
-}
-
-.c10 {
- font-size: var(--tokens-token-size);
- display: inline-block;
- margin-left: 4px;
-}
-
-.c16 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-@media (max-width:385px) {
- .c6 {
- -webkit-flex-basis: 55%;
- -ms-flex-preferred-size: 55%;
- flex-basis: 55%;
- }
-}
-
-
-
-
- MISSING: rewardsSummary
-
-
- MISSING: monthJun
-
- 2019
-
-
-
-
- MISSING: tokenGrantClaimed
-
-
-
-
-
-
- 10.0
-
-
- BAT
-
-
-
- 0.25
-
- USD
-
-
-
-
-
-
- MISSING: earningsAds
-
-
-
-
-
-
- 10.0
-
-
- BAT
-
-
-
- 0.25
-
- USD
-
-
-
-
-
-
- MISSING: rewardsContribute
-
-
-
-
-
- -
- 10.0
-
-
- BAT
-
-
-
- 0.25
-
- USD
-
-
-
-
-
-
- MISSING: recurringDonations
-
-
-
-
-
- -
- 2.0
-
-
- BAT
-
-
-
- 0.25
-
- USD
-
-
-
-
-
-
- MISSING: oneTimeDonation
-
-
-
-
-
- -
- 19.0
-
-
- BAT
-
-
-
- 5.25
-
- USD
-
-
-
-
-
-
-
-
-`;
diff --git a/src/features/rewards/walletSummary/index.tsx b/src/features/rewards/walletSummary/index.tsx
deleted file mode 100644
index 3f59e21e4..000000000
--- a/src/features/rewards/walletSummary/index.tsx
+++ /dev/null
@@ -1,177 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledWrapper,
- StyledInner,
- StyledTitle,
- StyledSummary,
- StyledActivity,
- StyledActivityIcon,
- StyledNoActivity,
- StyledNoActivityWrapper,
- StyledReservedWrapper,
- StyledReservedLink,
- StyledAllReserved
-} from './style'
-import ListToken from '../listToken'
-import { Type } from '../tokens'
-import { getLocale } from '../../../helpers'
-import { WalletInfoIcon } from '../../../components/icons'
-
-type Token = {
- tokens: string
- converted: string
- isNegative?: boolean
-}
-
-export interface Props {
- onActivity?: () => void
- report: {
- grant?: Token
- deposit?: Token
- ads?: Token
- contribute?: Token
- donation?: Token
- tips?: Token
- }
- id?: string
- compact?: boolean
- reservedAmount?: number
- reservedMoreLink?: string
- onSeeAllReserved?: () => void
-}
-
-export default class WalletSummary extends React.PureComponent {
- generateList = () => {
- const tokenSize = this.props.compact ? 'small' : 'normal'
- const list = [
- {
- key: 'grant',
- translation: 'tokenGrantClaimed',
- color: 'earnings'
- },
- {
- key: 'ads',
- translation: 'earningsAds',
- color: 'earnings'
- },
- {
- key: 'deposit',
- translation: 'deposits',
- color: 'earnings'
- },
- {
- key: 'contribute',
- translation: 'rewardsContribute',
- color: 'contribute',
- negative: true
- },
- {
- key: 'donation',
- translation: 'recurringDonations',
- color: 'donation',
- negative: true
- },
- {
- key: 'tips',
- translation: 'oneTimeDonation',
- color: 'donation',
- negative: true
- }
- ]
-
- let result: React.ReactNode[] = []
- const all = Object.keys(this.props.report).length
- let current = 0
-
- list.forEach((item, index) => {
- const data = (this.props.report as Record)[item.key]
- if (data) {
- current++
- result.push((
-
- ))
- }
- })
-
- if (result.length === 0) {
- return (
-
-
- {getLocale('noActivity')}
-
-
- )
- }
-
- return result
- }
-
- render () {
- const {
- id,
- onActivity,
- compact,
- reservedAmount,
- reservedMoreLink,
- onSeeAllReserved
- } = this.props
- const date = new Date()
- const month = getLocale(`month${date.toLocaleString('en-us', { month: 'short' })}`)
- const year = date.getFullYear()
-
- return (
-
-
- {getLocale('rewardsSummary')}
- {month} {year}
-
- {this.generateList()}
- {
- reservedAmount && reservedAmount > 0
- ?
- {getLocale('reservedAmountText', { reservedAmount: reservedAmount.toFixed(1) })}
- {getLocale('reservedMoreLink')}
-
- {
- onSeeAllReserved
- ?
- {getLocale('reservedAllLink')}
-
- : null
- }
-
- : null
- }
-
- {
- onActivity
- ?
-
-
-
- {getLocale('viewMonthly')}
-
- : null
- }
-
-
- )
- }
-}
diff --git a/src/features/rewards/walletSummary/spec.tsx b/src/features/rewards/walletSummary/spec.tsx
deleted file mode 100644
index dc0d9a688..000000000
--- a/src/features/rewards/walletSummary/spec.tsx
+++ /dev/null
@@ -1,46 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import WalletSummary, { Props } from './index'
-import { TestThemeProvider } from '../../../theme'
-
-const props = {
- report: {
- grant: { tokens: '10.0', converted: '0.25' },
- ads: { tokens: '10.0', converted: '0.25' },
- contribute: { tokens: '10.0', converted: '0.25' },
- donation: { tokens: '2.0', converted: '0.25' },
- tips: { tokens: '19.0', converted: '5.25' },
- total: { tokens: '19.0', converted: '5.25' },
- },
- onActivity: () => { }
-}
-
-describe('WalletSummary tests', () => {
- const baseComponent = (props: Props) =>
-
-
-
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const RealDate = Date
- global.Date = class extends RealDate {
- constructor () {
- return new RealDate('2019-06-02')
- }
- }
- const component = baseComponent(props)
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- global.Date = RealDate
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent(props))
- const assertion = wrapper.find('#empty').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/walletSummary/style.ts b/src/features/rewards/walletSummary/style.ts
deleted file mode 100644
index 7cbedf00f..000000000
--- a/src/features/rewards/walletSummary/style.ts
+++ /dev/null
@@ -1,106 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-import palette from '../../../theme/colors'
-
-interface StyleProps {
- compact?: boolean
-}
-
-const getGradientRule = (gradient: string) => {
- return `linear-gradient(-180deg, rgba(${gradient},1) 0%, rgba(255,255,255,1) 60%)`
-}
-
-export const StyledWrapper = styled('div')`
- min-height: 305px;
- padding: ${p => p.compact ? '0px 7px 0px' : '0px'};
- background: ${p => p.compact ? getGradientRule('233, 235, 255') : 'inherit'};
-`
-
-export const StyledInner = styled('div')`
- padding: 25px 14px 14px;
- font-family: Poppins, sans-serif;
-`
-export const StyledSummary = styled<{}, 'div'>('div')`
- font-size: 14px;
- font-weight: 600;
- line-height: 1.57;
- letter-spacing: 0.4px;
- color: #a1a8f2;
- text-transform: uppercase;
-`
-
-export const StyledTitle = styled<{}, 'div'>('div')`
- font-size: 22px;
- font-weight: 300;
- line-height: 0.79;
- letter-spacing: 0.4px;
- color: #4C54D2;
- margin: 4px 0 26px;
- text-transform: uppercase;
-`
-
-export const StyledActivity = styled<{}, 'button'>('button')`
- font-size: 12px;
- color: #686978;
- margin-top: 26px;
- text-align: center;
- padding: 0;
- border: none;
- background: none;
- width: 100%;
- cursor: pointer;
-`
-
-export const StyledActivityIcon = styled<{}, 'span'>('span')`
- vertical-align: middle;
- margin-right: 11px;
- width: 22px;
- height: 24px;
- color: #A1A8F2;
- display: inline-block;
-`
-
-export const StyledNoActivityWrapper = styled<{}, 'div'>('div')`
- width: 100%;
- margin-top: 80px;
- text-align: center;
-`
-
-export const StyledNoActivity = styled<{}, 'span'>('span')`
- font-weight: 400;
- color: #B8B9C4;
- font-size: 18px;
-`
-
-export const StyledReservedWrapper = styled<{}, 'div'>('div')`
- background: rgba(0, 0, 0, 0.04);
- color: #676283;
- font-size: 12px;
- font-family: ${p => p.theme.fontFamily.body};
- font-weight: normal;
- letter-spacing: 0;
- line-height: 16px;
- padding: 10px 12px;
- border-radius: 4px;
- margin: 20px 0 10px;
-`
-
-export const StyledReservedLink = styled('a')`
- color: ${palette.blue400};
- font-weight: bold;
- text-decoration: none;
- display: inline-block;
-`
-
-export const StyledAllReserved = styled('button')`
- background: none;
- border: none;
- padding: 0;
- display: block;
- margin-top: 10px;
- color: ${palette.blue400};
- cursor: pointer;
-`
diff --git a/src/features/rewards/walletSummarySlider/__snapshots__/spec.tsx.snap b/src/features/rewards/walletSummarySlider/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 2621a5810..000000000
--- a/src/features/rewards/walletSummarySlider/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,14 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`WalletSummarySlider tests basic tests matches the snapshot 1`] = `
-.c0 {
- display: block;
- width: 100%;
- height: 100%;
-}
-
-
-`;
diff --git a/src/features/rewards/walletSummarySlider/index.tsx b/src/features/rewards/walletSummarySlider/index.tsx
deleted file mode 100644
index 834bc2e7f..000000000
--- a/src/features/rewards/walletSummarySlider/index.tsx
+++ /dev/null
@@ -1,112 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import { getLocale } from '../../../helpers'
-
-import {
- StyledWrapper,
- StyledTransitionWrapper,
- StyledSummaryText,
- StyledToggleWrapper,
- StyledArrowIcon,
- StyledGrid,
- StyledColumn
-} from './style'
-
-import {
- CaratCircleOUpIcon,
- CaratCircleODownIcon
-} from '../../../components/icons'
-
-export interface Props {
- id?: string
- onToggle?: () => void
- children?: React.ReactNode | React.ReactNode[]
-}
-
-interface State {
- panelOneShown: boolean
- panelTwoShown: boolean
-}
-
-export default class WalletSummarySlider extends React.PureComponent<
- Props,
- State
-> {
- constructor (props: object) {
- super(props)
- this.state = {
- panelOneShown: true,
- panelTwoShown: false
- }
- this.togglePanels = this.togglePanels.bind(this)
- }
-
- togglePanels (showTitle: boolean, e: any) {
- if (!showTitle && this.state.panelOneShown) {
- return
- }
-
- this.setState({
- panelOneShown: !this.state.panelOneShown,
- panelTwoShown: !this.state.panelTwoShown
- })
-
- if (this.props.onToggle) {
- this.props.onToggle()
- }
- }
-
- getPanel (panel: React.ReactNode, showTitle: boolean = false) {
- return (
-
- {showTitle ? panel : null}
-
-
-
- {showTitle ? (
-
- {getLocale('rewardsSummary')}
-
- ) : null}
-
-
-
- {!showTitle ? : }
-
-
-
-
- {!showTitle ? panel : null}
-
- )
- }
-
- render () {
- const { id, children } = this.props
-
- if (!Array.isArray(children) || children[0] === null) {
- return {children}
- }
-
- if (!children || children.length !== 2) {
- return null
- }
-
- const panelOne = children[0]
- const panelTwo = children[1]
-
- return (
-
-
- {this.getPanel(panelOne, true)}
-
-
- {this.getPanel(panelTwo)}
-
-
- )
- }
-}
diff --git a/src/features/rewards/walletSummarySlider/spec.tsx b/src/features/rewards/walletSummarySlider/spec.tsx
deleted file mode 100644
index 967d5e460..000000000
--- a/src/features/rewards/walletSummarySlider/spec.tsx
+++ /dev/null
@@ -1,23 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import WalletSummarySlider from './index'
-
-describe('WalletSummarySlider tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#wallet-slider').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/walletSummarySlider/style.ts b/src/features/rewards/walletSummarySlider/style.ts
deleted file mode 100644
index 85e96b348..000000000
--- a/src/features/rewards/walletSummarySlider/style.ts
+++ /dev/null
@@ -1,60 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-
-interface StyleProps {
- show?: boolean
- size?: string
-}
-
-export const StyledWrapper = styled<{}, 'div'>('div')`
- display: block;
- width: 100%;
- height: 100%;
-` as any
-
-export const StyledTransitionWrapper = styled('div')`
- height: ${p => p.show ? '100%' : '0'};
- opacity: ${p => p.show ? '1' : '0'};
- overflow: ${p => p.show ? 'unset' : 'hidden'};
- position: relative;
-` as any
-
-export const StyledToggleWrapper = styled('div')`
- width: 100%;
- display: block;
- max-height: 56px;
- padding: ${p => p.show ? '18px 30px 20px 30px' : '20px'};
- top: ${p => p.show ? 'unset' : '12px'};
- position: ${p => p.show ? 'static' : 'absolute'};
- bottom: ${p => p.show ? '0px' : 'unset'};
- background: ${p => p.show ? '#E9EBFF' : 'inherit'};
-` as any
-
-export const StyledSummaryText = styled<{}, 'span'>('span')`
- color: #A1A8F2;
- font-size: 14px;
- font-weight: 600;
- text-transform: uppercase;
- letter-spacing: 0.35px;
- line-height: 22px;
-` as any
-
-export const StyledArrowIcon = styled('span')`
- width: 24px;
- height: 24px;
- display: flex;
- color: #696FDC;
-` as any
-
-export const StyledGrid = styled<{}, 'div'>('div')`
- display: flex;
- flex-direction: row;
- justify-content: space-between;
-`
-
-export const StyledColumn = styled('div')`
- display: flex;
-`
diff --git a/src/features/rewards/walletWrapper/__snapshots__/spec.tsx.snap b/src/features/rewards/walletWrapper/__snapshots__/spec.tsx.snap
deleted file mode 100644
index fab507e47..000000000
--- a/src/features/rewards/walletWrapper/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,147 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`WalletWrapper tests basic tests matches the snapshot 1`] = `
-.c0 {
- overflow: hidden;
- box-shadow: 0 2px 4px rgba(0,0,0,.2);
- font-family: Muli,sans-serif;
- width: 373px;
- background: url(test-file-stub) no-repeat top left, linear-gradient(172deg,#392dd1,rgba(255,26,26,0.53)), linear-gradient(#7d7bdc,#7d7bdc);
- min-height: 715px;
- border-radius: 6px;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-flex-direction: column;
- -ms-flex-direction: column;
- flex-direction: column;
- max-width: 415px;
- margin: 0 auto;
- position: relative;
-}
-
-.c1 {
- padding: 16px 21px 0 19px;
- position: relative;
- z-index: 2;
-}
-
-.c2 {
- font-size: 16px;
- font-weight: 500;
- line-height: 1.38;
- -webkit-letter-spacing: -0.2px;
- -moz-letter-spacing: -0.2px;
- -ms-letter-spacing: -0.2px;
- letter-spacing: -0.2px;
- color: rgba(255,255,255,0.65);
-}
-
-.c3 {
- text-align: center;
-}
-
-.c4 {
- font-size: 36px;
- line-height: 0.61;
- -webkit-letter-spacing: -0.4px;
- -moz-letter-spacing: -0.4px;
- -ms-letter-spacing: -0.4px;
- letter-spacing: -0.4px;
- color: #fff;
- margin-top: 10px;
- font-weight: 300;
-}
-
-.c8 {
- padding: 0px;
- background: #fff;
- -webkit-flex: 1;
- -ms-flex: 1;
- flex: 1;
-}
-
-.c6 {
- text-align: center;
- font-size: 12px;
- color: #fff;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-box-pack: space-evenly;
- -webkit-justify-content: space-evenly;
- -ms-flex-pack: space-evenly;
- justify-content: space-evenly;
- margin: 15px 0 5px 0;
- padding-bottom: 3px;
-}
-
-.c5 {
- text-transform: uppercase;
- opacity: 0.66;
- font-family: Muli,sans-serif;
- font-size: 16px;
- line-height: 0.88;
- color: #fff;
-}
-
-.c7 {
- padding: 10px 0;
- position: relative;
- overflow: hidden;
- margin: 0 -21px 0 -19px;
- z-index: 5;
-}
-
-.c7:before {
- content: "";
- position: absolute;
- bottom: -16px;
- margin-left: -50%;
- height: 240px;
- width: 200%;
- border-radius: 100%;
- border: 20px solid #fff;
-}
-
-
-
-
- MISSING: yourWallet
-
-
-
-
-
-
-
-`;
diff --git a/src/features/rewards/walletWrapper/assets/gift.svg b/src/features/rewards/walletWrapper/assets/gift.svg
deleted file mode 100644
index 3c41abdd3..000000000
--- a/src/features/rewards/walletWrapper/assets/gift.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-
\ No newline at end of file
diff --git a/src/features/rewards/walletWrapper/assets/love.svg b/src/features/rewards/walletWrapper/assets/love.svg
deleted file mode 100644
index 7b742ad81..000000000
--- a/src/features/rewards/walletWrapper/assets/love.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-
\ No newline at end of file
diff --git a/src/features/rewards/walletWrapper/assets/megaphone.svg b/src/features/rewards/walletWrapper/assets/megaphone.svg
deleted file mode 100644
index 7aa51887d..000000000
--- a/src/features/rewards/walletWrapper/assets/megaphone.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-
\ No newline at end of file
diff --git a/src/features/rewards/walletWrapper/assets/panel.svg b/src/features/rewards/walletWrapper/assets/panel.svg
deleted file mode 100644
index 886dc149a..000000000
--- a/src/features/rewards/walletWrapper/assets/panel.svg
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/src/features/rewards/walletWrapper/index.tsx b/src/features/rewards/walletWrapper/index.tsx
deleted file mode 100644
index 79de98e8c..000000000
--- a/src/features/rewards/walletWrapper/index.tsx
+++ /dev/null
@@ -1,759 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import {
- StyledWrapper,
- StyledHeader,
- StyledTitle,
- StyledBalance,
- StyledBalanceTokens,
- StyledContent,
- StyledAction,
- StyledActionIcon,
- StyledCopy,
- StyledCopyImage,
- StyledIconAction,
- StyledBalanceConverted,
- StyledGrantWrapper,
- StyledGrant,
- StyledActionWrapper,
- StyledBalanceCurrency,
- StyledCurve,
- StyledAlertWrapper,
- StyledAlertClose,
- StyleGrantButton,
- StyledActionText,
- StyledBAT,
- StyledNotificationIcon,
- StyledNotificationCloseIcon,
- StyledTypeText,
- StyledMessageText,
- StyledDateText,
- StyledNotificationContent,
- StyledButtonWrapper,
- StyledButton,
- StyledNotificationMessage,
- StyledPipe,
- StyledVerifiedButton,
- StyledVerifiedButtonIcon,
- StyledVerifiedButtonText,
- StyledDialogList,
- StyledLink
-} from './style'
-import { getLocale } from '../../../helpers'
-import { GrantCaptcha, GrantComplete, GrantError, GrantWrapper, WalletPopup } from '../'
-import Alert, { Type as AlertType } from '../alert'
-import Button, { Props as ButtonProps } from '../../../components/buttonsIndicators/button'
-import {
- CaratDownIcon,
- CaratUpIcon,
- CloseCircleOIcon,
- SettingsAdvancedIcon,
- UpholdColorIcon,
- UpholdSystemIcon,
- CaratCircleRightIcon
-} from '../../../components/icons'
-
-import giftIconUrl from './assets/gift.svg'
-import loveIconUrl from './assets/love.svg'
-import megaphoneIconUrl from './assets/megaphone.svg'
-
-type Grant = {
- tokens: string,
- expireDate: string,
- type: string
-}
-
-type GrantClaim = {
- promotionId?: string
- altcurrency?: string
- probi: string
- expiryTime: number
- captcha?: string
- hint?: string
- status?: 'wrongPosition' | 'grantGone' | 'generalError' | 'grantAlreadyClaimed' | number | null
- finishTokenTitle?: string
- finishTitle?: string
- finishText?: string
-}
-
-export interface AlertWallet {
- node: React.ReactNode
- type: AlertType
- onAlertClose?: () => void
-}
-
-export interface ActionWallet {
- icon: React.ReactNode
- name: string
- action: () => void
- testId?: string
-}
-
-export type NotificationType =
- 'ads' |
- 'ads-launch' |
- 'backupWallet' |
- 'contribute' |
- 'grant' |
- 'insufficientFunds' |
- 'tipsProcessed' |
- 'error' |
- 'pendingContribution' |
- 'verifyWallet' |
- ''
-
-export type WalletState =
- 'unverified' |
- 'verified' |
- 'connected' |
- 'disconnected_unverified' |
- 'disconnected_verified'
-
-export interface Notification {
- id: string
- date?: string
- type: NotificationType
- text: React.ReactNode
- onCloseNotification: (id: string) => void
-}
-
-export interface Props {
- balance: string
- converted: string | null
- actions: ActionWallet[]
- walletState?: WalletState
- compact?: boolean
- contentPadding?: boolean
- showCopy?: boolean
- children?: React.ReactNode
- showSecActions?: boolean
- onSettingsClick?: () => void
- onActivityClick?: () => void
- grants?: Grant[]
- grant?: GrantClaim
- alert?: AlertWallet | null
- id?: string
- gradientTop?: string
- isMobile?: boolean
- notification?: Notification
- onNotificationClick?: () => void
- onGrantHide?: () => void
- onFinish?: () => void
- onSolution?: (x: number, y: number) => void
- convertProbiToFixed?: (probi: string, place: number) => string
- onVerifyClick?: () => void
- onDisconnectClick?: () => void
- goToUphold?: () => void
- userName?: string
-}
-
-export type Step = '' | 'captcha' | 'complete'
-
-interface State {
- grantDetails: boolean,
- verificationDetails: boolean
-}
-
-export default class WalletWrapper extends React.PureComponent {
- constructor (props: Props) {
- super(props)
- this.state = {
- grantDetails: false,
- verificationDetails: false
- }
- }
-
- generateActions (actions: { icon: React.ReactNode, name: string, testId?: string, action: () => void }[], id?: string) {
- return actions && actions.map((action, i: number) => {
- return (
-
- {action.icon}
- {action.name}
-
- )
- })
- }
-
- onNotificationClick = () => {
- if (this.props.onNotificationClick) {
- this.props.onNotificationClick()
- }
- }
-
- onGrantHide = () => {
- if (this.props.onGrantHide) {
- this.props.onGrantHide()
- }
- }
-
- onFinish = () => {
- if (this.props.onFinish) {
- this.props.onFinish()
- }
- }
-
- onSolution = (x: number, y: number) => {
- if (this.props.onSolution) {
- this.props.onSolution(x, y)
- }
- }
-
- grantCaptcha = () => {
- const { grant } = this.props
- const status = grant && grant.status
-
- if (!grant || !grant.promotionId) {
- return
- }
-
- if (status === 'grantGone') {
- return (
-
-
-
- )
- }
-
- if (status === 'grantAlreadyClaimed') {
- return (
-
-
-
- )
- }
-
- if (status === 'generalError') {
- return (
-
-
-
- )
- }
-
- if (!grant.captcha || !grant.hint) {
- return
- }
-
- return (
-
-
-
- )
- }
-
- getNotificationButton = (type: NotificationType, onClose: any) => {
- let buttonText = 'OK'
- let buttonAction = onClose
-
- switch (type) {
- case 'grant':
- buttonText = getLocale('claim')
- buttonAction = this.onNotificationClick
- break
- case 'ads-launch':
- buttonText = getLocale('turnOnAds')
- buttonAction = this.onNotificationClick
- break
- case 'backupWallet':
- buttonText = getLocale('backupNow')
- buttonAction = this.onNotificationClick
- break
- case 'insufficientFunds':
- buttonText = getLocale('addFunds')
- buttonAction = this.onNotificationClick
- break
- case 'verifyWallet':
- buttonText = getLocale('whyHow').toUpperCase()
- buttonAction = this.onNotificationClick
- break
- default:
- buttonText = getLocale('ok').toUpperCase()
- break
- }
-
- return (
-
- )
- }
-
- generateNotification = (notification: Notification | undefined) => {
- if (!notification) {
- return null
- }
-
- const onClose = notification.onCloseNotification.bind(this, notification.id)
-
- return (
- <>
-
-
-
-
- {this.getNotificationIcon(notification)}
- {this.getNotificationMessage(notification)}
-
-
- {this.getNotificationButton(notification.type, onClose)}
-
-
- >
- )
- }
-
- generateWalletButton = (walletState: WalletState) => {
- const buttonProps: Partial = {
- size: 'small',
- level: 'primary',
- brand: 'rewards',
- onClick: this.props.onVerifyClick
- }
-
- switch (walletState) {
- case 'unverified':
- return (
- ,
- position: 'after'
- }}
- text={getLocale('walletButtonUnverified')}
- {...buttonProps}
- id={'verify-wallet-button'}
- />
- )
-
- case 'verified':
- return (
-
-
-
-
-
- {getLocale('walletButtonVerified')}
-
-
-
-
-
- )
-
- case 'connected':
- return (
- ,
- position: 'after'
- }}
- text={getLocale('walletButtonUnverified')}
- {...buttonProps}
- onClick={this.toggleVerificationDetails}
- id={'verify-wallet-button'}
- />
- )
-
- case 'disconnected_unverified':
- case 'disconnected_verified':
- return (
- ,
- position: 'before'
- }}
- {...buttonProps}
- id={'disconnected-wallet-button'}
- />
- )
- }
- }
-
- toggleVerificationDetails = () => {
- this.setState({ verificationDetails: !this.state.verificationDetails })
- }
-
- onDetailsLinkClicked = (action?: () => void) => {
- if (action) {
- action()
- }
- this.toggleVerificationDetails()
- }
-
- getVerificationDetails = () => {
- const { goToUphold, userName, onDisconnectClick, onVerifyClick, walletState } = this.props
- const verified = walletState === 'verified'
- const connected = walletState === 'connected'
-
- return (
-
- {
-
- {
- connected
- ?
-
- {getLocale('walletGoToVerifyPage')}
-
-
- : null
- }
-
-
- {getLocale('walletGoToUphold')}
-
-
-
-
- {getLocale('walletDisconnect')}
-
-
-
- }
-
- )
- }
-
- toggleGrantDetails = () => {
- this.setState({ grantDetails: !this.state.grantDetails })
- }
-
- hasGrants = (grants?: Grant[]) => {
- return grants && grants.length > 0
- }
-
- getNotificationIcon = (notification: Notification) => {
- let icon
-
- switch (notification.type) {
- case 'ads':
- case 'ads-launch':
- case 'backupWallet':
- case 'insufficientFunds':
- case 'verifyWallet':
- icon = megaphoneIconUrl
- break
- case 'contribute':
- case 'tipsProcessed':
- case 'pendingContribution':
- icon = loveIconUrl
- break
- case 'grant':
- icon = giftIconUrl
- break
- default:
- icon = ''
- break
- }
-
- if (!icon) {
- return null
- }
-
- return (
-
- )
- }
-
- getNotificationMessage = (notification: Notification) => {
- let typeText
-
- switch (notification.type) {
- case 'ads':
- typeText = getLocale('braveAdsTitle')
- break
- case 'ads-launch':
- typeText = getLocale('braveAdsLaunchTitle')
- break
- case 'backupWallet':
- typeText = getLocale('backupWalletTitle')
- break
- case 'contribute':
- typeText = getLocale('braveContributeTitle')
- break
- case 'grant':
- typeText = getLocale('tokenGrant')
- break
- case 'insufficientFunds':
- typeText = getLocale('insufficientFunds')
- break
- case 'tipsProcessed':
- typeText = getLocale('contributionTips')
- break
- case 'pendingContribution':
- typeText = getLocale('pendingContributionTitle')
- break
- case 'verifyWallet':
- typeText = getLocale('verifyWalletTitle')
- break
- default:
- typeText = ''
- break
- }
-
- return (
-
- {typeText} |
- {notification.text}
- {
- notification.date
- ? {notification.date}
- : null
- }
-
- )
- }
-
- render () {
- const {
- id,
- children,
- balance,
- converted,
- actions,
- showCopy,
- walletState,
- compact,
- contentPadding,
- showSecActions,
- grants,
- grant,
- onSettingsClick,
- alert,
- gradientTop,
- notification,
- isMobile,
- convertProbiToFixed,
- onVerifyClick,
- onDisconnectClick
- } = this.props
-
- const hasGrants = this.hasGrants(grants)
-
- let tokens = '0.0'
- if (grant && grant.probi && convertProbiToFixed) {
- tokens = convertProbiToFixed(grant.probi, 1)
- }
-
- let date = ''
- if (grant && grant.expiryTime !== 0) {
- date = new Date(grant.expiryTime).toLocaleDateString()
- }
-
- const walletVerified = walletState === 'verified' || walletState === 'disconnected_verified'
- const connectedVerified = walletState === 'verified'
-
- return (
- <>
-
- {
- grant && !grant.probi
- ? this.grantCaptcha()
- : null
- }
- {
- grant && grant.probi
- ?
-
-
- : null
- }
-
- {
- !notification
- ? <>
- {
- this.state.verificationDetails && onDisconnectClick
- ? this.getVerificationDetails()
- : null
- }
- {
- alert && alert.node
- ?
- {
- alert.onAlertClose
- ?
-
-
- : null
- }
-
- {alert.node}
-
-
- : null
- }
- {
- walletState
- ? this.generateWalletButton(walletState)
- : {getLocale('yourWallet')}
- }
- {
- showSecActions
- ?
-
-
- : null
- }
-
-
- {balance} BAT
-
- {
- converted
- ? {converted}
- : null
- }
- {
- hasGrants
- ?
- : }}
- />
-
- : null
- }
-
- {
- this.state.grantDetails && hasGrants
- ?
- {
- grants && grants.map((grant: Grant, i: number) => {
- return
- {grant.tokens} BAT
- {
- grant.type === 'ads'
- ? {getLocale('adsEarnings')}
- : {getLocale('expiresOn')} {grant.expireDate}
- }
-
- })
- }
-
- : null
- }
-
- {this.generateActions(actions, id)}
-
- >
- : this.generateNotification(notification)
- }
-
-
-
- {children}
-
- {
- showCopy
- ?
- {
- walletVerified
- ? <>
-
-
-
- {getLocale('rewardsPanelText1')} Uphold.
- >
- : <>
-
-
-
- {getLocale('rewardsPanelText2')} Uphold.
- {
- onVerifyClick
- ? <>
- {' ('}
-
- {getLocale('rewardsPanelTextVerify')}
-
- {')'}
- >
- : null
- }
- >
- }
-
- : null
- }
-
- {
- showCopy
- ?
- {getLocale('rewardsPanelText3')} {getLocale('rewardsPanelText4')}
-
- : null
- }
- >
- )
- }
-}
diff --git a/src/features/rewards/walletWrapper/spec.tsx b/src/features/rewards/walletWrapper/spec.tsx
deleted file mode 100644
index 457c7fa26..000000000
--- a/src/features/rewards/walletWrapper/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import WalletWrapper from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('WalletWrapper tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#panel').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/walletWrapper/style.ts b/src/features/rewards/walletWrapper/style.ts
deleted file mode 100644
index 458670a34..000000000
--- a/src/features/rewards/walletWrapper/style.ts
+++ /dev/null
@@ -1,380 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import { Notification } from './'
-import styled from '../../../theme'
-import palette from '../../../theme/colors'
-import Button, { Props as ButtonProps } from '../../../components/buttonsIndicators/button'
-import { ComponentType } from 'react'
-
-interface StyledProps {
- connected?: boolean,
- contentPadding?: boolean,
- compact?: boolean,
- background?: string,
- isMobile?: boolean,
- notification?: Notification | undefined
-}
-
-import panelBg from './assets/panel.svg'
-
-const getRGB = (rgbColor: string) => {
- return `rgb(${rgbColor})`
-}
-
-const wrapperBackgroundRules = (notification: Notification | undefined) => {
- if (!notification) {
- return `url(${panelBg}) no-repeat top left,
- linear-gradient(172deg, #392dd1, rgba(255, 26, 26, 0.53)),
- linear-gradient(#7d7bdc, #7d7bdc)`
- }
-
- return 'linear-gradient(-180deg, rgba(255,255,255,1) 0%, rgba(228,242,255,1) 40%)'
-}
-
-export const StyledWrapper = styled('div')`
- overflow: hidden;
- box-shadow: 0 2px 4px rgba(0,0,0,.2);
- font-family: ${p => p.theme.fontFamily.body};
- width: ${p => p.isMobile ? '100%' : '373px'};
- background: ${p => wrapperBackgroundRules(p.notification)};
- min-height: ${p => p.compact ? 'unset' : '715px'};
- border-radius: ${p => p.compact ? '0' : '6px'};
- display: flex;
- flex-direction: column;
- max-width: 415px;
- margin: 0 auto;
- position: relative;
-`
-
-export const StyledHeader = styled<{}, 'div'>('div')`
- padding: 16px 21px 0 19px;
- position: relative;
- z-index: 2;
-`
-
-export const StyledTitle = styled<{}, 'div'>('div')`
- font-size: 16px;
- font-weight: 500;
- line-height: 1.38;
- letter-spacing: -0.2px;
- color: rgba(255, 255, 255, 0.65);
-`
-
-export const StyledBalance = styled<{}, 'div'>('div')`
- text-align: center;
-`
-
-export const StyleGrantButton = styled<{}, 'div'>('div')`
- display: flex;
- justify-content: center;
-`
-
-export const StyledBalanceTokens = styled<{}, 'div'>('div')`
- font-size: 36px;
- line-height: 0.61;
- letter-spacing: -0.4px;
- color: #fff;
- margin-top: 10px;
- font-weight: 300;
-`
-
-export const StyledContent = styled('div')`
- padding: ${p => p.contentPadding ? '11px 25px 19px' : '0px'};
- background: #fff;
- flex: 1;
-`
-
-export const StyledAction = styled<{}, 'button'>('button')`
- display: flex;
- background: none;
- padding: 4px;
- border: none;
- cursor: pointer;
- align-items: center;
- color: #A1A8F2;
-`
-
-export const StyledActionIcon = styled<{}, 'div'>('div')`
- display: inline-block;
- width: 24px;
- height: 24px;
- margin-right: 6px;
- vertical-align: text-bottom;
-`
-
-export const StyledActionText = styled<{}, 'div'>('div')`
- color: #fff;
- font-size: 14px;
- opacity: 0.65;
-`
-
-export const StyledCopy = styled('div')`
- font-size: 12px;
- color: #838391;
- padding: 19px 15px;
- background: ${p => p.connected ? '#c4f2db' : '#dee2e6'};
- text-align: center;
-`
-
-export const StyledCopyImage = styled<{}, 'span'>('span')`
- vertical-align: middle;
- display: inline-block;
- color: #838391;
- width: 27px;
- height: 27px;
-`
-
-export const StyledIconAction = styled<{}, 'button'>('button')`
- position: absolute;
- top: 15px;
- right: 21px;
- background: none;
- padding: 0;
- border: none;
- cursor: pointer;
- color: #A1A8F2;
- width: 24px;
- height: 24px;
-`
-
-export const StyledBalanceConverted = styled<{}, 'div'>('div')`
- font-family: Muli, sans-serif;
- font-size: 12px;
- line-height: 1.17;
- text-align: center;
- color: rgba(255, 255, 255, 0.65);
- margin: 8px 0;
- font-weight: 300;
-`
-
-export const StyledGrantWrapper = styled<{}, 'div'>('div')`
- margin-top: 13px;
-`
-
-export const StyledGrant = styled<{}, 'div'>('div')`
- font-family: Muli, sans-serif;
- font-size: 12px;
- color: rgba(255, 255, 255, 0.60);
- text-align: center;
- margin-bottom: 3px;
-
- b {
- font-weight: 600;
- color: #fff;
- min-width: 81px;
- text-align: right;
- display: inline-block;
- padding-right: 5px;
- }
-
- span {
- min-width: 135px;
- text-align: left;
- display: inline-block;
- }
-`
-
-export const StyledActionWrapper = styled<{}, 'div'>('div')`
- text-align: center;
- font-size: 12px;
- color: #fff;
- display: flex;
- justify-content: space-evenly;
- margin: 15px 0 5px 0;
- padding-bottom: 3px;
-`
-
-export const StyledBalanceCurrency = styled<{}, 'span'>('span')`
- text-transform: uppercase;
- opacity: 0.66;
- font-family: Muli, sans-serif;
- font-size: 16px;
- line-height: 0.88;
- color: #fff;
-`
-
-export const StyledCurve = styled('div')`
- padding: 10px 0;
- position: relative;
- overflow: hidden;
- margin: 0 -21px 0 -19px;
- z-index: 5;
-
- :before {
- content: "";
- position: absolute;
- bottom: -16px;
- margin-left: -50%;
- height: 240px;
- width: 200%;
- border-radius: 100%;
- border: 20px solid ${p => p.background ? getRGB(p.background) : '#fff'};
- }
-`
-
-export const StyledAlertWrapper = styled<{}, 'div'>('div')`
- display: flex;
- align-items: stretch;
- position: absolute;
- top: 0;
- left: 0;
- height: 100%;
- z-index: 5;
- width: 100%;
-`
-
-export const StyledAlertClose = styled<{}, 'button'>('button')`
- position: absolute;
- background: none;
- border: none;
- padding: 0;
- top: 11px;
- right: 11px;
- cursor: pointer;
- width: 15px;
- height: 15px;
- color: #B8B9C4;
-`
-
-export const StyledBAT = styled<{}, 'div'>('div')`
- text-align: center;
- max-width: 300px;
- margin: 20px auto 0;
- color: #686978;
-
- a {
- color: #686978;
-
- &:hover {
- text-decoration: none;
- }
- }
-`
-
-export const StyledNotificationIcon = styled('img')`
- height: 48px;
- width: 48px;
- margin: 8px 0px 12px;
-`
-
-export const StyledNotificationCloseIcon = styled('div')`
- height: 20px;
- width: 20px;
- position: absolute;
- top: 16px;
- right: 16px;
- color: #9E9FAB;
- cursor: pointer;
-`
-
-export const StyledNotificationContent = styled('div')`
- display: block;
- text-align: center;
-`
-
-export const StyledNotificationMessage = styled('div')`
- max-width: 285px;
- color: #4B4C5C;
- padding-bottom: 5px;
- margin: 0 auto;
-`
-
-export const StyledTypeText = styled('span')`
- font-weight: 500;
- margin-right: 5px;
- display: inline-block;
-`
-
-export const StyledMessageText = styled('span')`
- line-height: 20px;
- font-weight: 400;
- margin: 0px 5px;
- font-family: Muli, sans-serif;
-`
-
-export const StyledDateText = styled('span')`
- font-weight: 400;
- margin-left: 5px;
- display: inline-block;
- color: #838391;
- font-family: Muli, sans-serif;
-`
-
-export const StyledButtonWrapper = styled('div')`
- margin: 12px 0 15px;
- display: flex;
- justify-content: center;
-`
-
-export const StyledButton = styled(Button as ComponentType)`
- padding-left: 27px;
- padding-right: 27px;
-`
-
-export const StyledPipe = styled('span')`
- font-weight: 300;
-`
-
-export const StyledVerifiedButton = styled<{}, 'button'>('button')`
- box-sizing: border-box;
- outline-color: transparent;
- display: flex;
- flex-direction: row;
- justify-content: center;
- align-items: center;
- font-family: Poppins, sans-serif;
- cursor: pointer;
- user-select: none;
- font-size: 11px;
- border-radius: 28px;
- min-width: 88px;
- padding: 7px 10px;
- color: #fff;
- background: inherit;
- border: none;
-`
-
-export const StyledVerifiedButtonText = styled<{}, 'div'>('div')`
- /* min-height so that we get consistent height with / without an icon */
- min-height: 14px;
- display: flex;
- align-items: center;
- text-align: center;
- letter-spacing: 0;
- font-weight: 500;
- line-height: 1;
-`
-
-export const StyledVerifiedButtonIcon = styled<{position: string}, 'div'>('div')`
- display: block;
- line-height: 0;
- height: 14px;
- width: 14px;
- margin: ${(p) => p.position === 'before' ? '0 6px 0 -4px' : '0 -4px 0 6px'};
-`
-
-export const StyledTextIcon = styled<{}, 'div'>('div')`
- line-height: initial;
- background: ${palette.blurple600};
- width: 16px;
- height: 16px;
- border-radius: 8px;
- margin: 0 10px;
-`
-
-export const StyledDialogList = styled<{}, 'ul'>('ul')`
- list-style-position: inside;
- padding-left: 0;
- margin: 0;
- line-height: 150%;
-`
-
-export const StyledLink = styled<{}, 'a'>('a')`
- color: ${palette.blue400};
- font-weight: bold;
- text-decoration: none;
- display: inline-block;
- cursor: pointer;
-`
diff --git a/src/features/rewards/welcomePage/__snapshots__/spec.tsx.snap b/src/features/rewards/welcomePage/__snapshots__/spec.tsx.snap
deleted file mode 100644
index 08e623bb6..000000000
--- a/src/features/rewards/welcomePage/__snapshots__/spec.tsx.snap
+++ /dev/null
@@ -1,843 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`WelcomePage tests basic tests matches the snapshot 1`] = `
-.c4 {
- text-align: center;
- min-height: 610px;
- padding: 60px 0 25px 0;
- border-top-left-radius: 35px;
- border-top-right-radius: 35px;
- background: linear-gradient(#392DD1,#8C41DE);
- border-bottom-left-radius: 150% 120px;
- border-bottom-right-radius: 150% 120px;
-}
-
-.c36 {
- height: 290px;
- border-radius: 4px;
- text-align: center;
- padding: 31px 15px 15px;
- background: #fff;
- max-width: 275px;
- margin: 0 auto;
- box-shadow: 0 2 4px rgba(0,0,0,.2);
-}
-
-.c39 {
- color: #222326;
- font-size: 18px;
- font-weight: 500;
- line-height: 28px;
-}
-
-.c40 {
- color: #686978;
- font-size: 16px;
- line-height: 22px;
- font-family: Muli,sans-serif;
- -webkit-letter-spacing: 0.16px;
- -moz-letter-spacing: 0.16px;
- -ms-letter-spacing: 0.16px;
- letter-spacing: 0.16px;
- margin: 10px 0 8px;
- font-weight: 400;
-}
-
-.c37 {
- box-sizing: border-box;
- display: block;
- max-width: 100%;
- margin: 10px auto 20px;
- height: 80px;
-}
-
-.c34 {
- display: grid;
- grid-gap: 0px;
- grid-template-columns: 1fr 1fr 1fr;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- -webkit-box-pack: center;
- -webkit-justify-content: center;
- -ms-flex-pack: center;
- justify-content: center;
-}
-
-.c35 {
- padding: 0 10px;
-}
-
-.c25 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-.c24 {
- -webkit-transform: rotate(-90deg);
- -ms-transform: rotate(-90deg);
- transform: rotate(-90deg);
-}
-
-.c41 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-.c38 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-.c42 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-.c6 {
- width: 100%;
- height: 100%;
- fill: currentColor;
-}
-
-.c10 {
- box-sizing: border-box;
- font-family: Poppins,sans-serif;
- font-weight: 400;
- -webkit-font-smoothing: antialiased;
- margin: 0;
-}
-
-.c9 {
- font-size: 40px;
-}
-
-.c31 {
- box-sizing: border-box;
- font-family: Poppins,sans-serif;
- font-weight: 400;
- -webkit-font-smoothing: antialiased;
- margin: 0;
-}
-
-.c30 {
- font-size: 32px;
-}
-
-.c14 {
- box-sizing: border-box;
- font-family: Poppins,sans-serif;
- font-weight: 400;
- -webkit-font-smoothing: antialiased;
- margin: 0;
-}
-
-.c13 {
- font-size: 24px;
-}
-
-.c17 {
- width: 100%;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- color: white;
- font-size: 14px;
- border-radius: 28px;
- background: inherit;
- border: none;
- cursor: pointer;
- height: 56px;
- border-radius: 28px;
- -webkit-letter-spacing: .6px;
- -moz-letter-spacing: .6px;
- -ms-letter-spacing: .6px;
- letter-spacing: .6px;
- border: 1px solid rgba(255,255,255,0.35);
-}
-
-.c17:hover {
- background: rgba(0,0,0,0.05);
-}
-
-.c17:focus {
- outline: 0;
-}
-
-.c47 {
- width: 100%;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- color: white;
- font-size: 14px;
- border-radius: 28px;
- background: inherit;
- border: none;
- cursor: pointer;
- height: 56px;
- -webkit-letter-spacing: .6px;
- -moz-letter-spacing: .6px;
- -ms-letter-spacing: .6px;
- letter-spacing: .6px;
- background: #FB542B;
-}
-
-.c47:focus {
- outline: 0;
-}
-
-.c18 {
- font-family: Poppins,sans-serif;
- font-weight: 600;
- text-transform: uppercase;
- -webkit-letter-spacing: 0.39px;
- -moz-letter-spacing: 0.39px;
- -ms-letter-spacing: 0.39px;
- letter-spacing: 0.39px;
- margin: 0 auto;
-}
-
-.c0 {
- background: #f2f4f7;
- min-height: 100vh;
- min-width: 1024px;
- font-family: Muli,sans-serif;
-}
-
-.c1 {
- max-width: 1024px;
- margin: 0 auto;
- padding: 48px 0;
-}
-
-.c16 {
- margin: 40px auto;
- max-width: 303px;
-}
-
-.c46 {
- max-width: 303px;
- margin: 0 auto;
-}
-
-.c44 {
- text-align: center;
-}
-
-.c26 {
- padding: 15px 0 0;
-}
-
-.c27 {
- margin: 0 auto;
- max-width: 692px;
- padding: 67px 0 20px;
-}
-
-.c3 {
- display: block;
-}
-
-.c33 {
- margin: 22px auto 0;
- max-width: 900px;
-}
-
-.c43 {
- margin: 0 auto;
- padding: 64px 0 79px;
- max-width: 500px;
- display: block;
-}
-
-.c2 {
- background: url(test-file-stub) no-repeat top;
-}
-
-.c5 {
- margin: 5px auto 0;
- height: 152px;
-}
-
-.c8 {
- font-weight: 500;
- color: #FFF;
- display: inline-block;
- margin: 17px 0 4px;
-}
-
-.c45 {
- color: #5C58C2;
- font-weight: normal;
- line-height: 28px;
- margin: 18px 0 30px;
-}
-
-.c29 {
- color: #222326;
- font-weight: normal;
- text-align: left;
- line-height: 28px;
- padding: 7px 0 21px;
- margin: 0;
-}
-
-.c12 {
- color: #5BC4FE;
- font-weight: 500;
- text-align: center;
- margin: 18px 0 7px;
-}
-
-.c11 {
- display: inline-block;
- vertical-align: text-top;
- margin-top: -25px;
- color: #FFF;
- font-size: 14px;
- font-weight: 300;
- opacity: 0.7;
-}
-
-.c15 {
- font-size: 16px;
- max-width: 375px;
- margin: 0 auto;
- line-height: 28px;
- color: #FFF;
-}
-
-.c22 {
- font-size: 16px;
- margin: 0 0 5px;
- line-height: 28px;
- color: #FFF;
- opacity: 0.5;
-}
-
-.c32 {
- font-size: 16px;
- line-height: 28px;
- color: #686978;
- -webkit-letter-spacing: 0.16px;
- -moz-letter-spacing: 0.16px;
- -ms-letter-spacing: 0.16px;
- letter-spacing: 0.16px;
- max-width: 475px;
- margin: 0 0 15px;
- font-weight: 400;
- font-family: Muli,sans-serif;
-}
-
-.c23 {
- padding: 0;
- border: none;
- background: none;
- cursor: pointer;
- color: #bf9fe3;
- height: 30px;
- overflow: hidden;
- outline: none;
-}
-
-.c23:focus {
- outline: 0;
-}
-
-.c19 {
- width: 325px;
- display: block;
- margin: -15px auto 15px;
-}
-
-.c48 {
- width: 325px;
- display: block;
- margin: 20px auto 0px;
-}
-
-.c20 {
- color: #fff;
- font-size: 14px;
- font-family: Muli,sans-serif;
- font-weight: normal;
- -webkit-letter-spacing: 0;
- -moz-letter-spacing: 0;
- -ms-letter-spacing: 0;
- letter-spacing: 0;
- line-height: 18px;
- opacity: 0.5;
-}
-
-.c49 {
- color: rgba(0,0,0,0.65);
- font-size: 12px;
- font-family: Muli,sans-serif;
- font-weight: normal;
- -webkit-letter-spacing: 0;
- -moz-letter-spacing: 0;
- -ms-letter-spacing: 0;
- letter-spacing: 0;
- line-height: 18px;
- opacity: 1;
-}
-
-.c21 {
- cursor: pointer;
- opacity: 1;
- color: #5BC4FE;
- font-weight: 600;
-}
-
-.c50 {
- cursor: pointer;
- opacity: 1;
- color: #1E2029;
- font-weight: 600;
-}
-
-@media (max-width:475px) {
- .c4 {
- padding-top: 35px;
- }
-}
-
-@media (max-width:640px) {
- .c34 {
- grid-gap: 20px;
- grid-template-columns: 1fr;
- }
-}
-
-@media (max-width:410px) {
- .c16 {
- margin: 40px 20px;
- max-width: unset;
- }
-}
-
-@media (max-width:767px) {
- .c27 {
- max-width: none;
- width: 100%;
- padding-top: 30px;
- }
-}
-
-@media (max-width:767px) {
- .c28 {
- margin: 0 auto;
- width: 80%;
- }
-}
-
-@media (max-width:980px) {
- .c2 {
- background: #F8FAFF;
- }
-}
-
-@media (max-width:460px) {
- .c5 {
- height: 100px;
- }
-}
-
-@media (max-width:360px) {
- .c8 {
- font-size: 36px;
- }
-}
-
-@media (max-width:360px) {
- .c12 {
- font-size: 22px;
- }
-}
-
-@media (max-width:400px) {
- .c7 {
- padding: 0 10px;
- }
-}
-
-
-
-
-
-
-
-
-
-
- MISSING: braveRewardsTitle
-
-
- TM
-
-
- MISSING: braveRewardsSubTitle
-
-
- MISSING: braveRewardsDesc
-
-
-
-
-
-
-
-
-
- MISSING: braveRewardsTeaser
-
-
-
-
-
-
-
-
-
-
- MISSING: whyBraveRewards
-
-
- MISSING: whyBraveRewardsDesc1
-
-
- MISSING: whyBraveRewardsDesc2
-
-
-
-
-
-
-
-
-
-
-
- MISSING: turnOnRewardsTitle
-
-
- MISSING: turnOnRewardsDesc
-
-
-
-
-
-
-
- MISSING: braveAdsTitle
-
-
- MISSING: braveAdsDesc
-
-
-
-
-
-
-
- MISSING: braveContributeTitle
-
-
- MISSING: braveContributeDesc
-
-
-
-
-
-
-
-
-
- MISSING: readyToTakePart
-
-
-
-
-
-
-
-
-
-
-
-`;
diff --git a/src/features/rewards/welcomePage/assets/centerTextBackground.svg b/src/features/rewards/welcomePage/assets/centerTextBackground.svg
deleted file mode 100644
index 770ff4d97..000000000
--- a/src/features/rewards/welcomePage/assets/centerTextBackground.svg
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
diff --git a/src/features/rewards/welcomePage/index.tsx b/src/features/rewards/welcomePage/index.tsx
deleted file mode 100644
index 07d99bff4..000000000
--- a/src/features/rewards/welcomePage/index.tsx
+++ /dev/null
@@ -1,296 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-
-// Components
-import Hero from '../hero'
-import Button from '../../../components/buttonsIndicators/button'
-import InfoCard, { CardProps } from '../infoCard'
-import {
- AdsMegaphoneIcon,
- ArrowDownIcon,
- BatColorIcon,
- LoaderIcon,
- RewardsActivateIcon,
- RewardsSendTipsIcon
-} from '../../../components/icons'
-import { Alert, RewardsButton, SettingsPage } from '../'
-
-// Utils
-import { getLocale } from '../../../helpers'
-
-// Styles
-import {
- StyledOptInSection,
- StyledOptInInnerSection,
- StyledCenterSection,
- StyledCenterContent,
- StyledSection,
- StyledCenterInner,
- StyledInfoContent,
- StyledTakeActionContent,
- StyledBackground,
- StyledBatLogo,
- StyledRewardsTitle,
- StyledActionTitle,
- StyledCenterTitle,
- StyledSubTitle,
- StyledTrademark,
- StyledRewardsParagraph,
- StyledTeaserParagraph,
- StyledCenterParagraph,
- StyledAnchor,
- StyledOptInSecond,
- StyledHeroInfo,
- StyledAlert,
- StyledAlertLeft,
- StyledAlertContent,
- StyledTOSWrapper,
- StyledServiceText,
- StyledServiceLink
-} from './style'
-
-export interface Props {
- id?: string
- optInAction: () => void
- creating?: boolean
- onReTry?: () => void
- onTOSClick?: () => void
- onPrivacyClick?: () => void
-}
-
-class WelcomePage extends React.PureComponent {
- private isTouchScreen: boolean
- private centerTextSection: HTMLDivElement | null
-
- constructor (props: Props) {
- super(props)
- this.centerTextSection = null
- this.isTouchScreen = 'ontouchstart' in window
- }
-
- scrollToCenter = () => {
- if (!this.centerTextSection) {
- return
- }
-
- const centerTextSection = this.centerTextSection
- if (centerTextSection) {
- window.scrollTo({
- behavior: 'smooth',
- top: centerTextSection.offsetTop
- })
- }
- }
-
- refSet = (node: HTMLDivElement) => {
- this.centerTextSection = node
- }
-
- optInAction = () => {
- this.props.optInAction()
- }
-
- hero = () => {
- const { onTOSClick, onPrivacyClick } = this.props
-
- return (
-
-
-
-
-
-
-
- {getLocale('braveRewardsTitle')}
-
- TM
-
- {getLocale('braveRewardsSubTitle')}
-
-
- {getLocale('braveRewardsDesc')}
-
-
-
-
- {
- this.props.creating
- ? }
- />
- :
- }
-
- {
- !this.isTouchScreen
- ?
-
- {getLocale('serviceTextWelcome')} {getLocale('termsOfService')} {getLocale('and')} {getLocale('privacyPolicy')}.
-
-
- : null
- }
-
-
- {getLocale('braveRewardsTeaser')}
-
-
-
-
-
-
- )
- }
-
- get centerTextContent () {
- return (
-
-
-
- {getLocale('whyBraveRewards')}
-
-
- {getLocale('whyBraveRewardsDesc1')}
-
-
- {getLocale('whyBraveRewardsDesc2')}
-
-
-
- )
- }
-
- optInContent = () => {
- const { onPrivacyClick, onTOSClick } = this.props
-
- return (
-
-
- {getLocale('readyToTakePart')}
-
-
- {
- this.props.creating
- ? }
- />
- :
- }
-
- {
- !this.isTouchScreen
- ?
-
- {getLocale('serviceTextReady')} {getLocale('termsOfService')} {getLocale('and')} {getLocale('privacyPolicy')}.
-
-
- : null
- }
-
- )
- }
-
- get infoCards (): CardProps[] {
- return [
- {
- title: getLocale('turnOnRewardsTitle'),
- description: getLocale('turnOnRewardsDesc'),
- icon:
- },
- {
- title: getLocale('braveAdsTitle'),
- description: getLocale('braveAdsDesc'),
- icon:
- },
- {
- title: getLocale('braveContributeTitle'),
- description: getLocale('braveContributeDesc'),
- icon:
- }
- ]
- }
-
- get welcomePageContent () {
- return (
- <>
- {
- this.props.onReTry
- ?
-
-
-
- {getLocale('walletFailedTitle')}
{getLocale('walletFailedText')}
-
-
-
-
-
- : null
- }
-
-
- {this.hero()}
-
-
-
- {this.centerTextContent}
-
-
-
-
-
- {this.optInContent()}
-
-
-
- >
- )
- }
-
- render () {
- const { id } = this.props
-
- // We don't need the SettingsPage wrapper on touchscreen devices
- if (this.isTouchScreen) {
- return this.welcomePageContent
- }
-
- return (
-
- {this.welcomePageContent}
-
- )
- }
-}
-
-export default WelcomePage
diff --git a/src/features/rewards/welcomePage/spec.tsx b/src/features/rewards/welcomePage/spec.tsx
deleted file mode 100644
index 9147d2a00..000000000
--- a/src/features/rewards/welcomePage/spec.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* global jest, expect, describe, it, afterEach */
-import * as React from 'react'
-import { shallow } from 'enzyme'
-import { create } from 'react-test-renderer'
-import WelcomePage from './index'
-import { TestThemeProvider } from '../../../theme'
-
-describe('WelcomePage tests', () => {
- const baseComponent = (props?: object) =>
-
- describe('basic tests', () => {
- it('matches the snapshot', () => {
- const component = baseComponent()
- const tree = create(component).toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- it('renders the component', () => {
- const wrapper = shallow(baseComponent())
- const assertion = wrapper.find('#welcome-page').length
- expect(assertion).toBe(1)
- })
- })
-})
diff --git a/src/features/rewards/welcomePage/style.ts b/src/features/rewards/welcomePage/style.ts
deleted file mode 100644
index 4f1784b36..000000000
--- a/src/features/rewards/welcomePage/style.ts
+++ /dev/null
@@ -1,226 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-import Heading from '../../../components/text/heading'
-import centerBackgroundUrl from './assets/centerTextBackground.svg'
-import palette from '../../../theme/colors'
-
-interface StyleProps {
- header?: boolean
-}
-
-export const StyledOptInSection = styled<{}, 'section'>('section')`
- margin: 40px auto;
- max-width: 303px;
-
- @media (max-width: 410px) {
- margin: 40px 20px;
- max-width: unset;
- }
-`
-
-export const StyledOptInSecond = styled<{}, 'section'>('section')`
- max-width: 303px;
- margin: 0 auto;
-`
-
-export const StyledOptInInnerSection = styled<{}, 'section'>('section')`
- text-align: center;
-`
-
-export const StyledCenterSection = styled<{}, 'section'>('section')`
- padding: 15px 0 0;
-`
-
-export const StyledCenterContent = styled<{}, 'div'>('div')`
- margin: 0 auto;
- max-width: 692px;
- padding: 67px 0 20px;
-
- @media (max-width: 767px) {
- max-width: none;
- width: 100%;
- padding-top: 30px;
- }
-`
-
-export const StyledSection = styled<{}, 'div'>('div')`
- display: block;
-`
-
-export const StyledCenterInner = styled<{}, 'section'>('section')`
- @media (max-width: 767px) {
- margin: 0 auto;
- width: 80%;
- }
-`
-
-export const StyledInfoContent = styled<{}, 'section'>('section')`
- margin: 22px auto 0;
- max-width: 900px;
-`
-
-export const StyledTakeActionContent = styled<{}, 'section'>('section')`
- margin: 0 auto;
- padding: 64px 0 79px;
- max-width: 500px;
- display: block;
-`
-
-export const StyledBackground = styled<{}, 'div'>('div')`
- background: url(${centerBackgroundUrl}) no-repeat top;
-
- @media (max-width: 980px) {
- background: #F8FAFF;
- }
-`
-
-export const StyledBatLogo = styled<{}, 'div'>('div')`
- margin: 5px auto 0;
- height: 152px;
-
- @media (max-width: 460px) {
- height: 100px;
- }
-`
-
-export const StyledRewardsTitle = styled(Heading)`
- font-weight: 500;
- color: #FFF;
- display: inline-block;
- margin: 17px 0 4px;
-
- @media (max-width: 360px) {
- font-size: 36px;
- }
-`
-
-export const StyledActionTitle = styled(Heading)`
- color: #5C58C2;
- font-weight: normal;
- line-height: 28px;
- margin: 18px 0 30px;
-`
-
-export const StyledCenterTitle = styled(Heading)`
- color: #222326;
- font-weight: normal;
- text-align: left;
- line-height: 28px;
- padding: 7px 0 21px;
- margin: 0;
-`
-
-export const StyledSubTitle = styled(Heading)`
- color: #5BC4FE;
- font-weight: 500;
- text-align: center;
- margin: 18px 0 7px;
-
- @media (max-width: 360px) {
- font-size: 22px;
- }
-`
-
-export const StyledTrademark = styled<{}, 'span'>('span')`
- display: inline-block;
- vertical-align: text-top;
- margin-top: -25px;
- color: #FFF;
- font-size: 14px;
- font-weight: 300;
- opacity: 0.7;
-`
-
-export const StyledRewardsParagraph = styled<{}, 'p'>('p')`
- font-size: 16px;
- max-width: 375px;
- margin: 0 auto;
- line-height: 28px;
- color: #FFF;
-`
-
-export const StyledTeaserParagraph = styled<{}, 'p'>('p')`
- font-size: 16px;
- margin: 0 0 5px;
- line-height: 28px;
- color: #FFF;
- opacity: 0.5;
-`
-
-export const StyledCenterParagraph = styled<{}, 'p'>('p')`
- font-size: 16px;
- line-height: 28px;
- color: #686978;
- letter-spacing: 0.16px;
- max-width: 475px;
- margin: 0 0 15px;
- font-weight: 400;
- font-family: Muli,sans-serif;
-`
-
-export const StyledAnchor = styled<{}, 'button'>('button')`
- padding: 0;
- border: none;
- background: none;
- cursor: pointer;
- color: #bf9fe3;
- height: 30px;
- overflow: hidden;
- outline: none;
-
- &:focus {
- outline: 0;
- }
-`
-
-export const StyledHeroInfo = styled<{}, 'div'>('div')`
- @media (max-width: 400px) {
- padding: 0 10px;
- }
-`
-export const StyledAlert = styled<{}, 'div'>('div')`
- margin-bottom: 30px;
- border: 1px solid #F43405;
- border-radius: 4px;
- overflow: hidden;
-
- @media (max-width: 767px) {
- display: none;
- }
-`
-
-export const StyledAlertContent = styled<{}, 'div'>('div')`
- display: flex;
- width: 100%;
-`
-
-export const StyledAlertLeft = styled<{}, 'div'>('div')`
- flex-basis: 70%;
- flex-grow: 1;
-`
-
-export const StyledTOSWrapper = styled('div')`
- width: 325px;
- display: block;
- margin: ${p => p.header ? -15 : 20}px auto ${p => p.header ? 15 : 0}px;
-`
-
-export const StyledServiceText = styled('span')`
- color: ${p => p.header ? '#fff' : 'rgba(0, 0, 0, 0.65)'};
- font-size: ${p => p.header ? 14 : 12}px;
- font-family: Muli, sans-serif;
- font-weight: normal;
- letter-spacing: 0;
- line-height: 18px;
- opacity: ${p => p.header ? 0.5 : 1};
-`
-
-export const StyledServiceLink = styled('a')`
- cursor: pointer;
- opacity: 1;
- color: ${p => p.header ? '#5BC4FE' : palette.black};
- font-weight: 600;
-`
diff --git a/src/index.ts b/src/index.ts
index ea35a2c47..79f945b09 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -3,5 +3,4 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */
export * from './components'
-export * from './features/rewards'
-export { initLocale } from './helpers'
+export { initLocale, getLocale } from './helpers'
diff --git a/stories/assets/img/alert.svg b/stories/assets/img/alert.svg
deleted file mode 100644
index 7a624b16e..000000000
--- a/stories/assets/img/alert.svg
+++ /dev/null
@@ -1,15 +0,0 @@
-
\ No newline at end of file
diff --git a/stories/assets/img/bg_siteBanner.jpg b/stories/assets/img/bg_siteBanner.jpg
deleted file mode 100644
index 384f7d01b..000000000
Binary files a/stories/assets/img/bg_siteBanner.jpg and /dev/null differ
diff --git a/stories/assets/img/brave-favicon.png b/stories/assets/img/brave-favicon.png
deleted file mode 100644
index d5bd67f02..000000000
Binary files a/stories/assets/img/brave-favicon.png and /dev/null differ
diff --git a/stories/assets/img/buzz.jpg b/stories/assets/img/buzz.jpg
deleted file mode 100644
index c587d0558..000000000
Binary files a/stories/assets/img/buzz.jpg and /dev/null differ
diff --git a/stories/assets/img/captchaDrop.png b/stories/assets/img/captchaDrop.png
deleted file mode 100644
index 71d164079..000000000
Binary files a/stories/assets/img/captchaDrop.png and /dev/null differ
diff --git a/stories/assets/img/ddgo.jpg b/stories/assets/img/ddgo.jpg
deleted file mode 100644
index 87214200f..000000000
Binary files a/stories/assets/img/ddgo.jpg and /dev/null differ
diff --git a/stories/assets/img/ddgo_site.png b/stories/assets/img/ddgo_site.png
deleted file mode 100644
index 1be397faa..000000000
Binary files a/stories/assets/img/ddgo_site.png and /dev/null differ
diff --git a/stories/assets/img/ddgo_siteBanner.svg b/stories/assets/img/ddgo_siteBanner.svg
deleted file mode 100644
index 6d534c929..000000000
--- a/stories/assets/img/ddgo_siteBanner.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/stories/assets/img/eich.jpg b/stories/assets/img/eich.jpg
deleted file mode 100644
index 184a6170c..000000000
Binary files a/stories/assets/img/eich.jpg and /dev/null differ
diff --git a/stories/assets/img/guardian.jpg b/stories/assets/img/guardian.jpg
deleted file mode 100644
index 8c08679db..000000000
Binary files a/stories/assets/img/guardian.jpg and /dev/null differ
diff --git a/stories/assets/img/icn-arrow.svg b/stories/assets/img/icn-arrow.svg
deleted file mode 100644
index 3b20d758d..000000000
--- a/stories/assets/img/icn-arrow.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/stories/assets/img/rewards_donate.svg b/stories/assets/img/rewards_donate.svg
deleted file mode 100644
index 6b8f2be68..000000000
--- a/stories/assets/img/rewards_donate.svg
+++ /dev/null
@@ -1,16 +0,0 @@
-
diff --git a/stories/assets/img/tesla.jpg b/stories/assets/img/tesla.jpg
deleted file mode 100644
index c5da80917..000000000
Binary files a/stories/assets/img/tesla.jpg and /dev/null differ
diff --git a/stories/assets/img/tip_site.jpg b/stories/assets/img/tip_site.jpg
deleted file mode 100644
index e640e9fea..000000000
Binary files a/stories/assets/img/tip_site.jpg and /dev/null differ
diff --git a/stories/assets/img/toricon.svg b/stories/assets/img/toricon.svg
deleted file mode 100644
index 7f337dddb..000000000
--- a/stories/assets/img/toricon.svg
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/stories/assets/img/wiki.jpg b/stories/assets/img/wiki.jpg
deleted file mode 100644
index eb8d92d77..000000000
Binary files a/stories/assets/img/wiki.jpg and /dev/null differ
diff --git a/stories/components/formControls.tsx b/stories/components/formControls.tsx
index 6ed53def6..408ab6265 100644
--- a/stories/components/formControls.tsx
+++ b/stories/components/formControls.tsx
@@ -11,7 +11,6 @@ import { withState } from '@dump247/storybook-state'
import centered from '@storybook/addon-centered'
// Components
-import { Tokens } from '../../src/features/rewards'
import { Toggle, Select, Checkbox, TextArea, TextAreaClipboard, Input, ControlWrapper, Radio } from '../../src/components'
import { CheckCircleIcon } from '../../src/components/icons'
@@ -86,45 +85,6 @@ storiesOf('Components/Form controls', module)
-
-
-
-
-
>
)
})
@@ -199,38 +159,10 @@ storiesOf('Components/Form controls', module)
disabled={boolean('Disabled', false)}
onChange={onChange}
>
-
-
-
-
-
-
-
-
-
-
-
-
+ 5
+ 10
+ 15
+ 20
diff --git a/stories/features/rewards/concepts.tsx b/stories/features/rewards/concepts.tsx
deleted file mode 100644
index 3ed93d884..000000000
--- a/stories/features/rewards/concepts.tsx
+++ /dev/null
@@ -1,539 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import { withState } from '@dump247/storybook-state'
-import { storiesOf } from '@storybook/react'
-import { withKnobs, boolean, number, text, object, select } from '@storybook/addon-knobs'
-
-// Components
-import Settings from './settings/settings'
-import SettingsMobile from './settingsMobile/settingsMobile'
-import {
- DisabledPanel,
- MediaBox,
- WalletPanelDisabled,
- SiteBanner,
- Tip,
- PanelWelcome,
- WalletPanel,
- WalletSummary,
- WalletSummarySlider,
- WalletWrapper
-} from '../../../src/features/rewards'
-import { BatColorIcon, WalletAddIcon } from '../../../src/components/icons'
-import WelcomePage from '../../../src/features/rewards/welcomePage'
-import { Notification, WalletState } from '../../../src/features/rewards/walletWrapper'
-
-const favicon = require('../../assets/img/brave-favicon.png')
-const siteBgImage = require('../../assets/img/bg_siteBanner.jpg')
-const siteBgLogo = require('../../assets/img/ddgo_siteBanner.svg')
-const siteScreen = require('../../assets/img/ddgo_site.png')
-
-const captchaDrop = require('../../assets/img/captchaDrop.png')
-
-const doNothing = (id: string) => {
- console.log('nothing')
-}
-
-const donationAmounts = [
- { tokens: '1.0', converted: '0.30', selected: false },
- { tokens: '5.0', converted: '1.50', selected: false },
- { tokens: '10.0', converted: '3.00', selected: false },
- { tokens: '50.0', converted: '15.00', selected: false },
- { tokens: '100.0', converted: '30.00', selected: false }
-]
-
-const defaultGrant = {
- promotionId: 'test',
- altcurrency: 'none',
- probi: '',
- expiryTime: 0,
- captcha: '',
- hint: '',
- finishTitle: 'It\'s your lucky day!',
- finishText: 'Your token grant is on its way.',
- finishTokenTitle: 'Free Token Grant'
-}
-
-const grantNotification = {
- id: '001',
- type: 'grant',
- date: 'July 7',
- onCloseNotification: doNothing,
- text: Free 30 BAT have been awarded to you.
-}
-
-const dummyOptInAction = () => {
- console.log(dummyOptInAction)
-}
-
-storiesOf('Feature Components/Rewards/Concepts/Desktop', module)
- .addDecorator(withKnobs)
- .add('Settings Page', () => {
- const walletProps = {
- grants: object('Claimed grants', [
- {
- tokens: '8.0',
- expireDate: '7/15/2018',
- type: 'ugp'
- },
- {
- tokens: '10.0',
- expireDate: '9/10/2018',
- type: 'ugp'
- },
- {
- tokens: '10.0',
- expireDate: '10/10/2018',
- type: 'ads'
- }
- ]),
- content: select('Content', {
- empty: 'empty',
- summary: 'summary',
- off: 'off'
- }, 'empty') as 'empty' | 'summary' | 'off',
- walletState: select('wallet status', {
- unverified: 'unverified',
- verified: 'verified',
- 'disconnected unverified': 'disconnected_unverified',
- 'disconnected verified': 'disconnected_verified'
- }, 'unverified') as WalletState
- }
- return ()
- })
- .add('Welcome Page', () => (
-
- ))
- .add('Site Banner', withState({ donationAmounts, currentAmount: '5.0', showBanner: true }, (store) => {
- const mediaProvider = select('Provider', { youtube: 'youtube', twitter: 'twitter', twitch: 'twitch', reddit: 'reddit', github: 'github' }, 'youtube')
- const screenName = text('Screen Name', '')
- const commentText = text('Post Text', '')
-
- const onDonate = () => {
- console.log('onDonate')
- }
-
- const onAmountSelection = (tokens: string) => {
- store.set({ currentAmount: tokens })
- }
-
- const showBanner = () => {
- store.set({ showBanner: true })
- }
-
- const isTwitterTip = () => {
- return mediaProvider === 'twitter'
- }
-
- const isRedditTip = () => {
- return mediaProvider === 'reddit'
- }
-
- const onClose = () => {
- store.set({ showBanner: false })
- }
-
- return (
-
-
- {
- store.state.showBanner
- ?
-
- {
- isTwitterTip()
- ?
- : isRedditTip()
- ?
- : null
- }
-
-
- : null
- }
-
- )
- }))
- .add('Tip', withState({ donationAmounts, currentAmount: '5.0', allow: false }, (store) => {
- const onDonate = () => {
- console.log('onDonate')
- }
-
- const onClose = () => {
- console.log('onClose')
- }
-
- const onAllow = (allow: boolean) => {
- store.set({ allow })
- }
-
- const onAmountSelection = (tokens: string) => {
- store.set({ currentAmount: tokens })
- }
-
- return (
-
- )
- }))
- .add('Pre Opt-In', withState({ creatingOne: false, creatingTwo: false }, (store) => {
- const creatingOne = () => {
- store.set({ creatingOne: true })
- }
-
- const creatingTwo = () => {
- store.set({ creatingTwo: true })
- }
-
- return (
-
- )
- }))
- .add('Disabled Panel', () => {
- const onPrivateLink = () => {
- console.log('open up private tab info')
- }
-
- const doNothing = () => {
- console.log('nothing')
- }
-
- return (
-
-
- },
- {
- name: 'Settings',
- action: doNothing,
- icon:
- }
- ]}
- showSecActions={false}
- grants={object('Grants', [
- {
- tokens: '8.0',
- expireDate: '7/15/2018',
- type: 'ugp',
- tokenText: 'Free Token Grant'
- },
- {
- tokens: '10.0',
- expireDate: '9/10/2018',
- type: 'ugp',
- tokenText: 'Free Token Grant'
- },
- {
- tokens: '10.0',
- expireDate: '10/10/2018',
- type: 'ads',
- tokenText: 'Your Brave Ads Token Grant'
- }
- ])}
- >
-
-
-
-
-
-
- )
- })
- .add('Wallet Panel', withState({ grant: defaultGrant, notification: grantNotification, showSummary: false, tipsEnabled: true, includeInAuto: true, refreshingPublisher: false, publisherRefreshed: false, verified: false }, (store) => {
- const curveRgb = '233,235,255'
- const panelRgb = '249,251,252'
-
- const getGradientColor = () => {
- return store.state.showSummary ? curveRgb : panelRgb
- }
-
- const doNothing = () => {
- console.log('do nothing')
- }
-
- const onCloseNotification = () => {
- console.log(onCloseNotification)
- }
-
- const onSummaryToggle = () => {
- store.set({ showSummary: !store.state.showSummary })
- }
-
- const onIncludeInAuto = () => {
- store.set({ includeInAuto: !store.state.includeInAuto })
- }
-
- const onRefreshPublisher = () => {
- store.set({ refreshingPublisher: !store.state.refreshingPublisher })
- setTimeout(() => {
- store.set({
- refreshingPublisher: !store.state.refreshingPublisher,
- publisherRefreshed: !store.state.publisherRefreshed,
- verified: true
- })
- }, 3000)
- }
-
- const onToggleTips = () => {
- store.set({ tipsEnabled: !store.state.tipsEnabled })
- }
-
- const onFetchCaptcha = () => {
- const hint = 'blue'
- const captcha = captchaDrop
- const newGrant = {
- ...store.state.grant,
- captcha,
- hint
- }
- store.set({ grant: newGrant })
- }
-
- const onGrantHide = () => {
- const hint = ''
- const captcha = ''
- const newGrant = {
- ...store.state.grant,
- captcha,
- hint
- }
- store.set({ grant: newGrant })
- }
-
- const onSolution = (x: number, y: number) => {
- const expiryTime = 99
- const newGrant = {
- ...store.state.grant,
- expiryTime
- }
- store.set({ grant: newGrant })
- }
-
- const onFinish = () => {
- store.set({ grant: undefined })
- store.set({ notification: undefined })
- }
-
- const onAmountChange = (event: React.ChangeEvent) => {
- console.log(`New value is: ${event.target.value}`)
- }
-
- const onVerifyClick = () => console.log('onVerifyClick')
- const onDisconnectClick = () => console.log('onDisconnectClick')
-
- const convertProbiToFixed = (probi: string, places: number = 1) => {
- return '0.0'
- }
-
- return (
-
-
-
- },
- {
- name: 'Settings',
- action: doNothing,
- icon:
- }
- ]}
- showCopy={boolean('Show Uphold', false)}
- showSecActions={false}
- grants={object('Grants', [
- {
- tokens: '8.0',
- expireDate: '7/15/2018',
- type: 'ugp'
- },
- {
- tokens: '10.0',
- expireDate: '9/10/2018',
- type: 'ugp'
- },
- {
- tokens: '10.0',
- expireDate: '10/10/2018',
- type: 'ads'
- }
- ])}
- grant={store.state.grant}
- onGrantHide={onGrantHide}
- onNotificationClick={onFetchCaptcha}
- onSolution={onSolution}
- onFinish={onFinish}
- convertProbiToFixed={convertProbiToFixed}
- walletState={select('wallet status', {
- unverified: 'unverified',
- verified: 'verified',
- 'disconnected unverified': 'disconnected_unverified',
- 'disconnected verified': 'disconnected_verified'
- }, 'unverified') as WalletState}
- onVerifyClick={onVerifyClick}
- onDisconnectClick={onDisconnectClick}
- userName={text('user name', 'jennrhim')}
- >
-
-
-
-
-
-
- )
- }))
-storiesOf('Feature Components/Rewards/Concepts/Mobile', module)
- .add('Welcome Page', () => (
-
- ))
- .add('Settings', () => )
diff --git a/stories/features/rewards/grant.tsx b/stories/features/rewards/grant.tsx
deleted file mode 100644
index e4fa39774..000000000
--- a/stories/features/rewards/grant.tsx
+++ /dev/null
@@ -1,80 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import { storiesOf } from '@storybook/react'
-import { withKnobs, text, select } from '@storybook/addon-knobs'
-import centered from '@storybook/addon-centered'
-
-// Components
-import GrantClaim from '../../../src/features/rewards/grantClaim'
-import GrantError from '../../../src/features/rewards/grantError'
-import GrantWrapper from '../../../src/features/rewards/grantWrapper'
-import GrantCaptcha from '../../../src/features/rewards/grantCaptcha'
-import GrantComplete from '../../../src/features/rewards/grantComplete'
-
-const captchaDrop = require('../../assets/img/captchaDrop.png')
-
-const dummyClick = () => {
- console.log(dummyClick)
-}
-
-storiesOf('Feature Components/Rewards/Grant', module)
- .addDecorator(withKnobs)
- .addDecorator(centered)
- .add('Grant claim', () => {
- return (
- ('Type', { ugp: 'ugp', ads: 'ads' }, 'ugp')}
- onClaim={dummyClick}
- />
- )
- })
- .add('Grant wrapper', () => {
- return (
-
-
- Content here
-
-
- )
- })
- .add('Grant captcha', () => {
- return (
-
-
-
- )
- })
- .add('Grant complete', () => {
- return (
-
-
-
- )
- })
- .add('Grant Error', () => {
- return (
-
-
-
- )
- })
diff --git a/stories/features/rewards/modal.tsx b/stories/features/rewards/modal.tsx
deleted file mode 100644
index 93670ca96..000000000
--- a/stories/features/rewards/modal.tsx
+++ /dev/null
@@ -1,738 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import { withState } from '@dump247/storybook-state'
-import { storiesOf } from '@storybook/react'
-import { withKnobs, text } from '@storybook/addon-knobs'
-
-// Components
-import { DetailRow as AdsHistoryRow } from '../../../src/features/rewards/tableAdsHistory'
-import { DetailRow as ContributeRow } from '../../../src/features/rewards/tableContribute'
-import { DetailRow as DonationDetailRow } from '../../../src/features/rewards/tableDonation'
-import { DetailRow as TransactionsRow } from '../../../src/features/rewards/tableTransactions'
-import { DetailRow as PendingDetailRow } from '../../../src/features/rewards/tablePending'
-import {
- ModalContribute,
- ModalBackupRestore,
- ModalActivity,
- ModalDonation,
- ModalPending,
- ModalRedirect,
- ModalShowAdsHistory,
- ModalVerify
-} from '../../../src/features/rewards'
-import ModalAddFunds, { Address } from '../../../src/features/rewards/modalAddFunds'
-
-const favicon = require('../../assets/img/brave-favicon.png')
-const ddgo = require('../../assets/img/ddgo.jpg')
-const wiki = require('../../assets/img/wiki.jpg')
-const buzz = require('../../assets/img/buzz.jpg')
-const guardian = require('../../assets/img/guardian.jpg')
-const eich = require('../../assets/img/eich.jpg')
-const tesla = require('../../assets/img/tesla.jpg')
-
-const doNothing = () => {
- console.log('nothing')
-}
-
-storiesOf('Feature Components/Rewards/Modal', module)
- .addDecorator(withKnobs)
- .add('Backup/Restore', withState({ activeTabId: 0 }, (store) => {
- const onTabChange = () => {
- const newId = store.state.activeTabId === 0 ? 1 : 0
- store.set({ activeTabId: newId })
- }
-
- return (
-
-
-
- )
- }))
- .add('Contribute', withState({ activeTabId: 0 }, (store) => {
- const onTabChange = () => {
- const newId = store.state.activeTabId === 0 ? 1 : 0
- store.set({ activeTabId: newId })
- }
-
- const rows: ContributeRow[] = [
- {
- profile: {
- name: 'Jonathon Doe',
- verified: true,
- provider: 'youtube',
- src: favicon
- },
- url: 'https://brave.com',
- attention: 40,
- onRemove: doNothing
- },
- {
- profile: {
- name: 'duckduckgo.com',
- verified: true,
- src: ddgo
- },
- url: 'https://brave.com',
- attention: 20,
- onRemove: doNothing
- },
- {
- profile: {
- name: 'buzzfeed.com',
- verified: false,
- src: buzz
- },
- url: 'https://brave.com',
- attention: 10,
- onRemove: doNothing
- },
- {
- profile: {
- name: 'theguardian.com',
- verified: true,
- src: guardian
- },
- url: 'https://brave.com',
- attention: 5,
- onRemove: doNothing
- },
- {
- profile: {
- name: 'wikipedia.org',
- verified: false,
- src: wiki
- },
- url: 'https://brave.com',
- attention: 4,
- onRemove: doNothing
- }
- ]
-
- return (
-
- )
- }))
- .add('Activity', () => {
- const contributions: ContributeRow[] = [
- {
- profile: {
- name: 'Jonathon Doe',
- verified: true,
- provider: 'youtube',
- src: favicon
- },
- url: 'https://brave.com',
- attention: 40,
- onRemove: doNothing,
- token: {
- value: '5.0',
- converted: '5.00'
- }
- },
- {
- profile: {
- name: 'duckduckgo.com',
- verified: true,
- src: ddgo
- },
- url: 'https://brave.com',
- attention: 20,
- onRemove: doNothing,
- token: {
- value: '4.0',
- converted: '11.00'
- }
- },
- {
- profile: {
- name: 'buzzfeed.com',
- verified: false,
- src: buzz
- },
- url: 'https://brave.com',
- attention: 10,
- onRemove: doNothing,
- token: {
- value: '3.0',
- converted: '15.00'
- }
- },
- {
- profile: {
- name: 'theguardian.com',
- verified: true,
- src: guardian
- },
- url: 'https://brave.com',
- attention: 5,
- onRemove: doNothing,
- token: {
- value: '2.0',
- converted: '17.00'
- }
- },
- {
- profile: {
- name: 'wikipedia.org',
- verified: false,
- src: wiki
- },
- url: 'https://brave.com',
- attention: 4,
- onRemove: doNothing,
- token: {
- value: '1.0',
- converted: '11.00'
- }
- }
- ]
-
- const transactions: TransactionsRow[] = [
- {
- date: '6/1',
- type: 'deposit',
- description: 'Brave Ads payment for May',
- amount: {
- value: '5.0',
- converted: '5.00'
- }
- },
- {
- date: '6/9',
- type: 'tipOnLike',
- description: {
- publisher: 'Jonathon Doe',
- platform: 'YouTube'
- },
- amount: {
- isNegative: true,
- value: '5.0',
- converted: '11.00'
- }
- },
- {
- date: '6/10',
- type: 'deposit',
- description: 'Token grant made available or unlocked',
- amount: {
- value: '10.0',
- converted: '15.00'
- }
- },
- {
- date: '6/12',
- type: 'donation',
- description: 'coinmarketcap.com',
- amount: {
- isNegative: true,
- value: '10.0',
- converted: '15.00'
- }
- },
- {
- date: '6/14',
- type: 'tipOnLike',
- description: {
- publisher: 'BrendanEich',
- platform: 'Twitter'
- },
- amount: {
- isNegative: true,
- value: '1.0',
- converted: '2.00'
- }
- },
- {
- date: '6/26',
- type: 'deposit',
- description: 'Added via Uphold',
- amount: {
- value: '10.0',
- converted: '15.00'
- }
- },
- {
- date: '6/31',
- type: 'contribute',
- description: 'Monthly payment',
- amount: {
- isNegative: true,
- value: '10.0',
- converted: '15.00'
- }
- },
- {
- date: '6/31',
- type: 'recurringDonation',
- description: 'Monthly payment',
- amount: {
- isNegative: true,
- value: '5.0',
- converted: '15.00'
- }
- }
- ]
-
- return (
-
- )
- })
- .add('Add funds', () => {
- const addresses: Address[] = [
- {
- type: 'BTC',
- address: '17fBi3kyqUd2jjPDSi8ArBbMWso16qmxW5',
- qr: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALkAAAC5CAAAAABRxsGAAAABz0lEQVR42u3cQY7DIAwF0Nz/0u1uVgP5hqYV8Fh1lFF4qVRjbNrrteq4yMnJycnJycnJycnJyXeRX/ejfcO/q6X/q89GTn62PJiz+Wdz9v/uXJqNnJy8/blvRo9mLGg+V302cnLyAXm6jAfBiZyc/EF5kJ+n9yMnJ5/Pz4OZSnvu7+0syMmXlwdr+Qdffbk6R06+sjxu1YRpeD9f+EWHi5x8ZXnwuW8+QwAs1a3JycnjwJEm34OtpFJuT05+tjyIMkHtqm6bjy3k5MfI09JT0A5KL8THqcjJT5WnnddHwkqAJicnj/fDaa82zRzmO7nk5MfI+4SgxBz0eftv22hsISffVx6Ei9J0/TJYvQBNTk6ebJSDq6Os6bMW5OT7ypO1NzwhVdpf99MMcnLyuPP68HONrv7k5GfJSy2d+nY7jUHk5OQ38mDOWokqXP3nYws5+W7ydPRjUD3vLu25ycmPlV/3I60zB6cp+q/mO1zk5FvK04hSP9FU+qrAJ6tz5OS7yeuHK9IE4aoMcnLyUflgzCgVvsnJyedjS1oQSytq89U5cvLN5fWraWoerPTk5OTzv4FWf8z0uR6szpGTryxfYpCTk5OTk5OTk5OTk5OvON4QJEO8FpFK4QAAAABJRU5ErkJggg=='
- },
- {
- type: 'ETH',
- address: '0xF10bfc0EB8Fcfd1240a5BB97C3e5a7752cD1C388',
- qr: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAM0AAADNCAAAAAA+16u1AAACPklEQVR42u3bwU7DMBAE0P7/T8ONA1LcGXsTFfRyKpQ2+3IY2bvm9fWfrhcNDQ0NDQ0NDQ0NDQ0NDc2p5vX+6m7y84lfry6/ebMCGhqaSU1QW/CJX2+kT6KvgIaG5h7NZd5UubQu6/KbgwpoaGg+QNNn2iWYhobm72rSzwZxRkND81GatGex+bG14eHdGg0NTd/rvPnVw51bGhqajTHj8iZplWlL5O4pLg0NTbC7qIruextBqtLQ0DyiqQaYl8LL363Dbv04hlY2NDQ0qSYoK4ikILqC5c15ptHQ0FSa4E792HJzhHo08aChoTmeEfQ3Duae/RLqqMtBQ0NzsrIJGhebtfWtz/P9DQ0NTZVpgStY43T9yrBDQkND84imGmX2rYn10qiKMxoamnFNuhxJrZvnH9MGBw0NzbgmbWakZaVReHIaioaGZkhTRVe1sgkmKNXGh4aG5h7NzHQybWb0OXfU66ShoakmHsGwI9gMBXk4s8ahoaEZ0lSdy+CU08k/TQ0lNA0NzaYmaFqmG5X+EY13bmloaI4zbXOP0g871o9tKKFpaGjSTAuOL6Y90X7Pk8YZDQ3NpCZuKoQHodYxlbY5aWhontO83l/rP+6LmTlQTUNDM6lJkyzY7lSLpODJ0tDQPKfZLDCIs2p4Mtm5paGhuVmzLjrY5KQNTxoamo/XHGfaxgiGhoZmWpO+GxxcSmNq8+ADDQ3NuCbdbAQ/phuV4I9v7NzS0ND8g4uGhoaGhoaGhoaGhoaGhqa5vgFTleQ0sHcoKgAAAABJRU5ErkJggg=='
- },
- {
- type: 'BAT',
- address: '0xF10bfc0EB8Fcfd1240a5BB97C3e5a7752cD1C388',
- qr: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAM0AAADNCAAAAAA+16u1AAACPklEQVR42u3bwU7DMBAE0P7/T8ONA1LcGXsTFfRyKpQ2+3IY2bvm9fWfrhcNDQ0NDQ0NDQ0NDQ0NDc2p5vX+6m7y84lfry6/ebMCGhqaSU1QW/CJX2+kT6KvgIaG5h7NZd5UubQu6/KbgwpoaGg+QNNn2iWYhobm72rSzwZxRkND81GatGex+bG14eHdGg0NTd/rvPnVw51bGhqajTHj8iZplWlL5O4pLg0NTbC7qIruextBqtLQ0DyiqQaYl8LL363Dbv04hlY2NDQ0qSYoK4ikILqC5c15ptHQ0FSa4E792HJzhHo08aChoTmeEfQ3Duae/RLqqMtBQ0NzsrIJGhebtfWtz/P9DQ0NTZVpgStY43T9yrBDQkND84imGmX2rYn10qiKMxoamnFNuhxJrZvnH9MGBw0NzbgmbWakZaVReHIaioaGZkhTRVe1sgkmKNXGh4aG5h7NzHQybWb0OXfU66ShoakmHsGwI9gMBXk4s8ahoaEZ0lSdy+CU08k/TQ0lNA0NzaYmaFqmG5X+EY13bmloaI4zbXOP0g871o9tKKFpaGjSTAuOL6Y90X7Pk8YZDQ3NpCZuKoQHodYxlbY5aWhontO83l/rP+6LmTlQTUNDM6lJkyzY7lSLpODJ0tDQPKfZLDCIs2p4Mtm5paGhuVmzLjrY5KQNTxoamo/XHGfaxgiGhoZmWpO+GxxcSmNq8+ADDQ3NuCbdbAQ/phuV4I9v7NzS0ND8g4uGhoaGhoaGhoaGhoaGhqa5vgFTleQ0sHcoKgAAAABJRU5ErkJggg=='
- },
- {
- type: 'LTC',
- address: 'Le8aswhmGJjn9jP5teEWdyJARak4xU8sCn',
- qr: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAM0AAADNCAAAAAA+16u1AAACOUlEQVR42u3bQXLDIAwF0Nz/0u0FYvKFBNN0Hit7mtq8LDTwRV4//2m8aGhoaGhoaGhoaGhoaGhouprX57H+8LvnvbstPXT9DhoamnHNc+F4fNZyWmvX0AxoaGimNe/qyONf16UrqILBO2hoaL5Is4YESx4aGpov0pRK13prQ0ND86c0gbX0zvX0g/nS0NDc0wRJ4+Gry8ktDQ3NRptxL7ksTfBeF5eGhibYXQSR5mPtS/dBHTANDc2kJkguSwUrtbYaojQ0NEc06e1mSVq7gmCUhobmoCbIHIPOZsnVWd7Q0NCMa9Iwo9TZ3MgwwwyEhoZmXBN0MR+vgmVL50QEDQ3NPU2w4Ci1LUvdzsmUg4aGpt73TE8lBWlIqYhNdjxoaGg6fc/A1d6ZpKcjk7fR0NAMatJ5pM3PYPsU/Ec/s6GhoUlXNmlforRsqR9yCLqiNDQ045pSWekccCr1VvtZJw0NTSfrDEpXUBnTk9HpXouGhua0Zv3AzW7n+iMH+540NDT1rHN97LkejsRLlM9nrmloaO5pSpFmWr+Cn1qkSy0aGprLmtJpqHVcEViH9jc0NDQlTTo2s41SejF5oouGhqaTdaYlKbgKdk6lM9I0NDRnNEElS0OP9DtJ26o0NDT3NEG96fQvgv3Smd0aDQ3NoGZzPVPqc9DQ0PxlTTC3/orlc8BBQ0NzRpMGmeltUMTW3ywNDc09TZBPBH3PemFrlVEaGpoZzdcOGhoaGhoaGhoaGhoaGhqayvgFbnvHJxkVZlQAAAAASUVORK5CYII='
- }
- ]
-
- return (
-
- )
- })
- .add('Add funds (JP)', () => {
- const addresses: Address[] = [
- {
- type: 'BAT',
- address: '0xF10bfc0EB8Fcfd1240a5BB97C3e5a7752cD1C388',
- qr: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAM0AAADNCAAAAAA+16u1AAACPklEQVR42u3bwU7DMBAE0P7/T8ONA1LcGXsTFfRyKpQ2+3IY2bvm9fWfrhcNDQ0NDQ0NDQ0NDQ0NDc2p5vX+6m7y84lfry6/ebMCGhqaSU1QW/CJX2+kT6KvgIaG5h7NZd5UubQu6/KbgwpoaGg+QNNn2iWYhobm72rSzwZxRkND81GatGex+bG14eHdGg0NTd/rvPnVw51bGhqajTHj8iZplWlL5O4pLg0NTbC7qIruextBqtLQ0DyiqQaYl8LL363Dbv04hlY2NDQ0qSYoK4ikILqC5c15ptHQ0FSa4E792HJzhHo08aChoTmeEfQ3Duae/RLqqMtBQ0NzsrIJGhebtfWtz/P9DQ0NTZVpgStY43T9yrBDQkND84imGmX2rYn10qiKMxoamnFNuhxJrZvnH9MGBw0NzbgmbWakZaVReHIaioaGZkhTRVe1sgkmKNXGh4aG5h7NzHQybWb0OXfU66ShoakmHsGwI9gMBXk4s8ahoaEZ0lSdy+CU08k/TQ0lNA0NzaYmaFqmG5X+EY13bmloaI4zbXOP0g871o9tKKFpaGjSTAuOL6Y90X7Pk8YZDQ3NpCZuKoQHodYxlbY5aWhontO83l/rP+6LmTlQTUNDM6lJkyzY7lSLpODJ0tDQPKfZLDCIs2p4Mtm5paGhuVmzLjrY5KQNTxoamo/XHGfaxgiGhoZmWpO+GxxcSmNq8+ADDQ3NuCbdbAQ/phuV4I9v7NzS0ND8g4uGhoaGhoaGhoaGhoaGhqa5vgFTleQ0sHcoKgAAAABJRU5ErkJggg=='
- }
- ]
-
- return (
-
- )
- })
- .add('Donation', () => {
- const rows: DonationDetailRow[] = [
- {
- profile: {
- name: 'Jonathon Doe',
- verified: true,
- provider: 'youtube',
- src: favicon
- },
- url: 'https://brave.com',
- type: 'recurring',
- contribute: {
- tokens: '2.0',
- converted: '0.20'
- },
- onRemove: doNothing
- },
- {
- profile: {
- verified: false,
- name: 'theguardian.com',
- src: guardian
- },
- url: 'https://brave.com',
- type: 'donation',
- contribute: {
- tokens: '12000.0',
- converted: '6000.20'
- },
- text: 'May 7'
- },
- {
- profile: {
- verified: false,
- name: 'BrendanEich',
- provider: 'twitter',
- src: eich
- },
- url: 'https://brave.com',
- type: 'tip',
- contribute: {
- tokens: '7.0',
- converted: '3.20'
- },
- text: 'May 2'
- }
- ]
- return (
-
- )
- })
- .add('Pending contributions',() => {
- const rows: PendingDetailRow[] = [
- {
- profile: {
- name: 'Jonathon Doe',
- verified: true,
- provider: 'youtube',
- src: favicon
- },
- url: 'https://brave.com',
- type: 'recurring',
- amount: {
- tokens: '2.0',
- converted: '0.20'
- },
- date: 'Jan 2',
- onRemove: doNothing
- },
- {
- profile: {
- verified: false,
- name: 'theguardian.com',
- src: guardian
- },
- url: 'https://brave.com',
- type: 'tip',
- amount: {
- tokens: '12000.0',
- converted: '6000.20'
- },
- date: 'May 7',
- onRemove: doNothing
- },
- {
- profile: {
- verified: false,
- name: 'BrendanEich',
- provider: 'twitter',
- src: eich
- },
- url: 'https://brave.com',
- type: 'ac',
- amount: {
- tokens: '1.0',
- converted: '0.20'
- },
- date: 'May 2',
- onRemove: doNothing
- }
- ]
- return (
-
- )
- })
- .add('Redirect',() => {
- return (
- here.' }}
- onClick={doNothing}
- />
- )
- })
- .add('Verify', () => {
- return (
-
-
-
- )
- })
- .add('Show Ads History',() => {
- const adsPerHour = 2
- const adId: number = 0
- const rowId: number = 0
- const rows: AdsHistoryRow[] = [
- {
- id: rowId.toString(),
- date: '1/30',
- adDetailRows: [
- {
- id: adId.toString(),
- adContent: {
- brand: 'Pepsi',
- brandLogo: '',
- brandUrl: 'https://www.pepsi.com',
- brandDisplayUrl: 'pepsi.com',
- brandInfo: 'Animation & VFX Degree - Degree in Animation |',
- adAction: 'view',
- likeAction: 1,
- onThumbUpPress: doNothing,
- onThumbDownPress: doNothing,
- onMenuFlag: doNothing,
- onMenuSave: doNothing,
- savedAd: false,
- flaggedAd: false
- },
- categoryContent: {
- category: 'Entertainment',
- optAction: 0,
- onOptInAction: doNothing,
- onOptOutAction: doNothing
- }
- },
- {
- id: (adId + 1).toString(),
- adContent: {
- brand: 'TESLA',
- brandLogo: '',
- brandUrl: 'https://www.tesla.com',
- brandDisplayUrl: 'tesla.com',
- brandInfo: 'Animation & VFX Degree - Degree in Animation |',
- adAction: 'click',
- likeAction: 2,
- onThumbUpPress: doNothing,
- onThumbDownPress: doNothing,
- onMenuFlag: doNothing,
- onMenuSave: doNothing,
- savedAd: true,
- flaggedAd: false,
- logoUrl: tesla
- },
- categoryContent: {
- category: 'Technology & Computing',
- optAction: 0,
- onOptInAction: doNothing,
- onOptOutAction: doNothing
- }
- },
- {
- id: (adId + 2).toString(),
- adContent: {
- brand: 'Disney',
- brandLogo: '',
- brandUrl: 'https://www.disney.com',
- brandDisplayUrl: 'disney.com',
- brandInfo: 'Animation & VFX Degree - Degree in Animation |',
- adAction: 'click',
- likeAction: 0,
- onThumbUpPress: doNothing,
- onThumbDownPress: doNothing,
- onMenuFlag: doNothing,
- onMenuSave: doNothing,
- savedAd: false,
- flaggedAd: false
- },
- categoryContent: {
- category: 'Travel',
- optAction: 0,
- onOptInAction: doNothing,
- onOptOutAction: doNothing
- }
- }
- ]
- },
- {
- id: (rowId + 1).toString(),
- date: '1/29',
- adDetailRows: [
- {
- id: (adId + 3).toString(),
- adContent: {
- brand: 'Puma',
- brandLogo: '',
- brandUrl: 'https://www.puma.com',
- brandDisplayUrl: 'puma.com',
- brandInfo: 'Animation & VFX Degree - Degree in Animation |',
- adAction: 'landed',
- likeAction: 1,
- onThumbUpPress: doNothing,
- onThumbDownPress: doNothing,
- onMenuFlag: doNothing,
- onMenuSave: doNothing,
- savedAd: false,
- flaggedAd: false
- },
- categoryContent: {
- category: 'Sports',
- optAction: 1,
- onOptInAction: doNothing,
- onOptOutAction: doNothing
- }
- },
- {
- id: (adId + 4).toString(),
- adContent: {
- brand: 'Expedia.com',
- brandLogo: '',
- brandUrl: 'https://www.expedia.com',
- brandDisplayUrl: 'expedia.com',
- brandInfo: 'Animation & VFX Degree - Degree in Animation |',
- adAction: 'view',
- likeAction: 0,
- onThumbUpPress: doNothing,
- onThumbDownPress: doNothing,
- onMenuFlag: doNothing,
- onMenuSave: doNothing,
- savedAd: true,
- flaggedAd: true
- },
- categoryContent: {
- category: 'Travel',
- optAction: 2,
- onOptInAction: doNothing,
- onOptOutAction: doNothing
- }
- },
- {
- id: (adId + 5).toString(),
- adContent: {
- brand: 'H&M',
- brandLogo: '',
- brandUrl: 'https://www.hm.com',
- brandDisplayUrl: 'hm.com',
- brandInfo: 'Animation & VFX Degree - Degree in Animation |',
- adAction: 'dismiss',
- likeAction: 0,
- onThumbUpPress: doNothing,
- onThumbDownPress: doNothing,
- onMenuFlag: doNothing,
- onMenuSave: doNothing,
- savedAd: true,
- flaggedAd: false
- },
- categoryContent: {
- category: 'Fashion',
- optAction: 1,
- onOptInAction: doNothing,
- onOptOutAction: doNothing
- }
- }
- ]
- }
- ]
- return (
-
- )
- })
- .add('Show Empty Ads History',() => {
- const adsPerHour = 0
- return (
-
- )
- })
diff --git a/stories/features/rewards/other.tsx b/stories/features/rewards/other.tsx
deleted file mode 100644
index e96d808ee..000000000
--- a/stories/features/rewards/other.tsx
+++ /dev/null
@@ -1,387 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import { withState } from '@dump247/storybook-state'
-import { storiesOf } from '@storybook/react'
-import { withKnobs, boolean, select, text, object, number } from '@storybook/addon-knobs'
-import centered from '@storybook/addon-centered'
-// Components
-import {
- Box,
- DisabledContent,
- Alert,
- MainToggle,
- Donate,
- List,
- ListToken,
- Tokens,
- Profile,
- Amount,
- PanelWelcome,
- ToggleTips,
- Tooltip,
- DonationOverlay,
- MediaBox,
- Tab
-} from '../../../src/features/rewards'
-import {
- BoxMobile,
- MainToggleMobile
-} from '../../../src/features/rewards/mobile'
-import { BatColorIcon, SettingsIcon, UpholdColorIcon } from '../../../src/components/icons'
-import GrantClaim from '../../../src/features/rewards/grantClaim'
-
-const favicon = require('../../assets/img/brave-favicon.png')
-const tipScreen = require('../../assets/img/tip_site.jpg')
-const siteBgLogo = require('../../assets/img/ddgo_siteBanner.svg')
-
-const dummyClick = () => {
- console.log(dummyClick)
-}
-
-const donationAmounts = [
- { tokens: '1.0', converted: '0.30', selected: false },
- { tokens: '5.0', converted: '1.50', selected: false },
- { tokens: '10.0', converted: '3.00', selected: false }
-]
-
-storiesOf('Feature Components/Rewards/Other/Desktop', module)
- .addDecorator(withKnobs)
- .addDecorator(centered)
- .add('Box', withState({ checked: false, toggle: true, settings: false }, (store) => {
- const onToggle = () => {
- store.set({ checked: !store.state.checked })
- }
- const onSettingsToggle = () => {
- store.set({ settings: !store.state.settings })
- }
- return (
-
-
('Type', { contribute: 'contribute', donation: 'donation', ads: 'ads' }, 'contribute')}
- description={
- text('Description', `Earn tokens by seeing ads on Brave. Ads are matched from machine learning and the data temporarily present in your browser without tracking your information or sending it outside.`)
- }
- onToggle={onToggle}
- settingsChild={Settings content
}
- settingsOpened={store.state.settings}
- onSettingsClick={onSettingsToggle}
- >
- Some content
-
-
- )
- }))
- .add('Disabled content', () => {
- return (
- ('Type', { contribute: 'contribute', donation: 'donation', ads: 'ads' }, 'donation')}
- >
- • Donate on the spot as you find gems.
- • Enable Tips on Twitter, YouTube, and more, to give tips to posts you ‘Like’.
-
- )
- })
- .add('Alert', () => {
- return (
- ('Type', { error: 'error', success: 'success', warning: 'warning' }, 'success')}
- bg={boolean('Background color', false)}
- colored={boolean('Text color', false)}
- >
- Funds received! 25 BAT are added to your wallet successfully.
-
- )
- })
- .add('Main toggle', withState({ checked: false }, (store) => {
- const onToggle = () => {
- store.set({ checked: !store.state.checked })
- }
- return (
-
-
-
- )
- }))
- .add('Donate', withState({ donationAmounts, currentAmount: '5.0' }, (store) => {
- const onDonate = () => {
- console.log('onDonate')
- }
-
- const onAmountSelection = (tokens: string) => {
- store.set({ currentAmount: tokens })
- }
-
- return (
-
- ('Type', { big: 'big', small: 'small' }, 'small')}
- balance={number('Balance ', 5)}
- donationAmounts={object('Donations', store.state.donationAmounts)}
- onDonate={onDonate}
- title={'Donation amount'}
- actionText={text('Action text', 'Send my Donation')}
- onAmountSelection={onAmountSelection}
- currentAmount={text('Current amount', store.state.currentAmount)}
- />
-
- )
- }))
- .add('List', () => {
- return (
-
-
- Some content
-
-
- )
- })
- .add('List - Token', () => {
- return (
-
-
('Color', { contribute: 'contribute', donation: 'donation', earnings: 'earnings', notPaid: 'notPaid', default: 'default' }, 'default')}
- size={select('Size', { normal: 'normal', small: 'small' }, 'small')}
- />
-
- )
- })
- .add('Tokens', () => {
- return (
- ('Color', { contribute: 'contribute', donation: 'donation', earnings: 'earnings', notPaid: 'notPaid', default: 'default' }, 'default')}
- size={select('Size', { normal: 'normal', small: 'small' }, 'small')}
- />
- )
- })
- .add('Profile', () => {
- return (
-
-
('Type', { big: 'big', small: 'small' }, 'big')}
- title={'Jonathon Doe'}
- verified={boolean('Verified', false)}
- provider={select('Provider', { youtube: 'youtube', twitter: 'twitter', twitch: 'twitch', reddit: 'reddit', vimeo: 'vimeo', github: 'github' }, 'youtube')}
- src={favicon}
- />
-
- )
- })
- .add('Amount', withState({ selected: false }, (store) => {
- const onSelect = () => {
- store.set({ selected: !store.state.selected })
- }
-
- return (
-
-
('Type', { big: 'Big', small: 'Small' }, 'big')}
- onSelect={onSelect}
- />
-
- )
- }))
- .add('Grant claim', () => {
- return (
-
- )
- })
- .add('Panel Welcome', () => {
- return (
-
-
('Variant', { one: 'One', two: 'Two' }, 'one')}
- moreLink={dummyClick}
- />
-
- )
- })
- .add('Toggle Tips', withState({ tipsEnabled: true }, (store) => {
- const onToggle = () => {
- store.set({ tipsEnabled: !store.state.tipsEnabled })
- }
- return (
- ('Provider', { youtube: 'youtube', twitter: 'twitter', twitch: 'twitch', reddit: 'reddit', vimeo: 'vimeo', github: 'github' }, 'youtube')}
- />
- )
- }))
- .add('Tooltip', () => {
- const braveAdsText = Brave Ads Settings
- const batLogoText = BAT Logo
- const styledUpholdContent = (
-
-
- Uphold. The Internet of Money.
-
-
- )
-
- return (
-
- )
- })
- .add('Donation Overlay', withState({ displayed: true }, (store) => {
- const onOverlayClose = () => {
- store.set({ displayed: false })
- }
-
- return (
-
- {
- store.state.displayed
- ? ('Recurring', { yes: 'October 31st, 2018', no: '' }, 'October 31st, 2018')}
- logo={boolean('Show logo', false) ? siteBgLogo : null}
- onTweet={boolean('Show Tweet Now button', false) ? dummyClick : undefined}
- />
- : null
- }
-
- )
- }))
- .add('Tweet Box', () => {
- const mediaProvider = select('Provider', { twitter: 'twitter', reddit: 'reddit' }, 'twitter')
- return (
-
- )
- })
- .add('Tab', withState({ tabIndexSelected: 0 }, (store) => {
- const onSwitch = () => {
- const newIndex = store.state.tabIndexSelected === 0 ? 1 : 0
- store.set({ tabIndexSelected: newIndex })
- }
-
- return (
-
-
-
- )
- }))
-storiesOf('Feature Components/Rewards/Other/Mobile', module)
- .addDecorator(withKnobs)
- .addDecorator(centered)
- .add('Box', withState({ checked: true, toggle: true }, (store) => {
- const onToggle = () => {
- store.set({ checked: !store.state.checked })
- }
-
- return (
-
-
('Type', { contribute: 'contribute', donation: 'donation', ads: 'ads' }, 'contribute')}
- description={
- text('Description', `A simple way to support content creators. Set monthly allowance and browse normally. Your favorite sites (content sites only) receive your contributions automatically. You can exclude sites from funding right from the list below.`)
- }
- toggleAction={onToggle}
- settingsChild={Settings content
}
- >
-
-
-
- )
- }))
- .add('Main Toggle', withState({ checked: false }, (store) => {
- let items = []
- for (let i = 0; i < 25; i++) {
- items.push(i)
- }
-
- const onToggle = () => {
- store.set({ checked: !store.state.checked })
- }
- return (
-
-
- {items.map(i =>
-
-
-
- )}
-
- )
- }))
diff --git a/stories/features/rewards/settings/adsBox.tsx b/stories/features/rewards/settings/adsBox.tsx
deleted file mode 100644
index a66dbc597..000000000
--- a/stories/features/rewards/settings/adsBox.tsx
+++ /dev/null
@@ -1,45 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-
-// Components
-import { DisabledContent, Box, BoxAlert } from '../../../../src/features/rewards'
-
-// Utils
-import locale from './fakeLocale'
-
-class AdsBox extends React.Component {
- adsDisabled () {
- return (
-
- {locale.adsDisabledTextOne}
- {locale.adsDisabledTextTwo}
-
- )
- }
-
- adsAlertChild = () => {
- return (
-
- )
- }
-
- render () {
- return (
-
- )
- }
-}
-
-export default AdsBox
diff --git a/stories/features/rewards/settings/contributeBox.tsx b/stories/features/rewards/settings/contributeBox.tsx
deleted file mode 100644
index e2a7193f1..000000000
--- a/stories/features/rewards/settings/contributeBox.tsx
+++ /dev/null
@@ -1,238 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-
-// Components
-import {
- Box,
- DisabledContent,
- List,
- ModalContribute,
- TableContribute,
- Tokens
-} from '../../../../src/features/rewards'
-import { Column, Grid, Select, ControlWrapper, Checkbox } from '../../../../src/components'
-import { DetailRow as ContributeDetailRow } from '../../../../src/features/rewards/tableContribute'
-import NextContribution from '../../../../src/features/rewards/nextContribution'
-
-// Utils
-import locale from './fakeLocale'
-
-// Assets
-const favicon = require('../../../assets/img/brave-favicon.png')
-const buzz = require('../../../assets/img/buzz.jpg')
-const ddgo = require('../../../assets/img/ddgo.jpg')
-const guardian = require('../../../assets/img/guardian.jpg')
-const wiki = require('../../../assets/img/wiki.jpg')
-
-const doNothing = () => {
- console.log('nothing')
-}
-
-interface State {
- contributeToggle: boolean
- modalContribute: boolean
- settings: boolean
-}
-
-class ContributeBox extends React.Component<{}, State> {
- constructor (props: {}) {
- super(props)
- this.state = {
- contributeToggle: true,
- modalContribute: false,
- settings: false
- }
- }
-
- contributeSettingsChild = () => {
- return (
- <>
-
-
-
-
-
-
-
-
-
-
-
-
-
- {locale.contributionNonVerified}
- {locale.contributionVideos}
-
-
-
-
- >
- )
- }
-
- get contributeRows (): ContributeDetailRow[] {
- return [
- {
- profile: {
- name: 'Jonathon Doe',
- verified: true,
- provider: 'youtube',
- src: favicon
- },
- url: 'https://brave.com',
- attention: 40,
- onRemove: doNothing
- },
- {
- profile: {
- name: 'duckduckgo.com',
- verified: true,
- src: ddgo
- },
- url: 'https://brave.com',
- attention: 20,
- onRemove: doNothing
- },
- {
- profile: {
- name: 'buzzfeed.com',
- verified: false,
- src: buzz
- },
- url: 'https://brave.com',
- attention: 10,
- onRemove: doNothing
- },
- {
- profile: {
- name: 'theguardian.com',
- verified: true,
- src: guardian
- },
- url: 'https://brave.com',
- attention: 5,
- onRemove: doNothing
- },
- {
- profile: {
- name: 'wikipedia.org',
- verified: false,
- src: wiki
- },
- url: 'https://brave.com',
- attention: 4,
- onRemove: doNothing
- }
- ]
- }
-
- contributeDisabled () {
- return (
-
- Pay directly for the content you love.
- Your monthly allowance gets divided based on your attention metric.
-
- )
- }
-
- onContributeToggle = () => {
- this.setState({ contributeToggle: !this.state.contributeToggle })
- }
-
- onContributeModalClose = () => {
- this.setState({ modalContribute: false })
- }
-
- onContributeModalOpen = () => {
- this.setState({ modalContribute: true })
- }
-
- onSettingsToggle = () => {
- this.setState({ settings: !this.state.settings })
- }
-
- render () {
- return (
-
- {
- this.state.modalContribute
- ?
- : null
- }
-
-
-
-
- July 25th
-
-
- Total
-
-
- Please visit some sites
-
-
- )
- }
-}
-
-export default ContributeBox
diff --git a/stories/features/rewards/settings/donationsBox.tsx b/stories/features/rewards/settings/donationsBox.tsx
deleted file mode 100644
index a1e1519bb..000000000
--- a/stories/features/rewards/settings/donationsBox.tsx
+++ /dev/null
@@ -1,159 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-
-// Components
-import { Box, BoxAlert, TableDonation, Tokens, List } from '../../../../src/features/rewards'
-import { DetailRow as DonationDetailRow } from '../../../../src/features/rewards/tableDonation'
-import { Column, Grid, Checkbox, ControlWrapper } from '../../../../src/components'
-
-// Utils
-import locale from './fakeLocale'
-
-// Assets
-const favicon = require('../../../assets/img/brave-favicon.png')
-const eich = require('../../../assets/img/eich.jpg')
-const guardian = require('../../../assets/img/guardian.jpg')
-
-const doNothing = () => {
- console.log('nothing')
-}
-
-type Check = { yt: boolean, tw: boolean, inst: boolean }
-
-interface State {
- check: Check,
- settings: boolean
-}
-
-class DonationsBox extends React.Component<{}, State> {
- constructor (props: {}) {
- super(props)
- this.state = {
- check: {
- yt: true,
- tw: false,
- inst: false
- },
- settings: false
- }
- }
-
- get donationRows (): DonationDetailRow[] {
- return [
- {
- profile: {
- name: 'Jonathon Doe',
- verified: true,
- provider: 'youtube',
- src: favicon
- },
- url: 'https://brave.com',
- type: 'recurring',
- contribute: {
- tokens: '2.0',
- converted: '0.20'
- },
- onRemove: doNothing
- },
- {
- profile: {
- verified: false,
- name: 'theguardian.com',
- src: guardian
- },
- url: 'https://brave.com',
- type: 'donation',
- contribute: {
- tokens: '12.0',
- converted: '6.20'
- },
- text: 'May 7'
- },
- {
- profile: {
- verified: false,
- name: 'BrendanEich',
- provider: 'twitter',
- src: eich
- },
- url: 'https://brave.com',
- type: 'tip',
- contribute: {
- tokens: '7.0',
- converted: '3.20'
- },
- text: 'May 2'
- }
- ]
- }
-
- onChange = (key: string, selected: boolean, child: React.ReactNode, all: { [key: string]: boolean }) => {
- this.setState({
- check: all as Check
- })
- }
-
- donationAlertChild = () => {
- return (
-
- )
- }
-
- donationSettingsChild = () => {
- return (
- <>
-
-
-
-
- YouTube
- Twitter
- Reddit
- GitHub
- Instagram
-
-
-
-
- >
- )
- }
-
- onSettingsToggle = () => {
- this.setState({ settings: !this.state.settings })
- }
-
- render () {
- return (
-
-
-
-
-
- Please visit some sites
-
-
- )
- }
-}
-
-export default DonationsBox
diff --git a/stories/features/rewards/settings/fakeLocale.ts b/stories/features/rewards/settings/fakeLocale.ts
deleted file mode 100644
index 60a309993..000000000
--- a/stories/features/rewards/settings/fakeLocale.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-const locale = {
- adsDesc: 'Earn tokens by seeing ads on Brave. Ads are matched from machine learning and the data temporarily present in your browser without tracking your information or sending it outside.',
- adsDisabledTextOne: 'Earnings are paid every month.',
- adsDisabledTextTwo: 'Set your desired frequency to increase or decrease earnings.',
- adsDisplayed: 'Ads displayed',
- adsEarnings: 'Earnings this month',
- adsFreq: 'Ad Frequency',
- adsMode: 'Ad mode',
- adsTitle: 'Brave Ads',
- contributionAllowed: 'What should be allowed?',
- contributionDesc: 'A simple way to support content creators. Set monthly allowance and browse normally. Your favorite sites (content sites only) receive your contributions automatically. You can exclude sites from funding here.',
- contributionMinTime: 'Minimum page time before logging a visit',
- contributionMinVisits: 'Minimum visits for publisher relevancy',
- contributionMonthly: 'Monthly budget',
- contributionNextDate: 'Next contribution date',
- contributionNonVerified: 'Allow contribution to non-verified sites',
- contributionSites: 'Supported sites',
- contributionTime5: '5 seconds',
- contributionTime60: '60 seconds',
- contributionTime8: '8 seconds',
- contributionTitle: 'Brave Contribute',
- contributionVideos: 'Allow contribution to videos',
- contributionVisit10: '10 visits',
- contributionVisit1: '1 visit',
- contributionVisit5: '5 visits',
- donationDesc: 'Tip content creators directly as you browse or give tips to videos and tweets that you ‘like’. You can also set up recurring monthly tips so you can support sites continuously.',
- donationTitle: 'Tips',
- donationTotal: 'Total tips this month'
-}
-
-export default locale
diff --git a/stories/features/rewards/settings/grant.tsx b/stories/features/rewards/settings/grant.tsx
deleted file mode 100644
index d8dfd3985..000000000
--- a/stories/features/rewards/settings/grant.tsx
+++ /dev/null
@@ -1,93 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-
-// Components
-import {
- GrantCaptcha,
- GrantClaim,
- GrantComplete,
- GrantWrapper
-} from '../../../../src/features/rewards'
-import { Type } from '../../../../src/features/rewards/grantClaim'
-
-// Assets
-const captchaDrop = require('../../../assets/img/captchaDrop.png')
-
-type Step = '' | 'captcha' | 'complete'
-
-interface State {
- grantShow: boolean
- grantStep: Step
-}
-
-interface Props {
- type: Type
- amount?: string
-}
-
-class Grant extends React.Component {
- constructor (props: Props) {
- super(props)
- this.state = {
- grantShow: true,
- grantStep: ''
- }
- }
-
- onGrantShow = () => {
- this.setState({ grantStep: 'captcha' })
- }
-
- onGrantHide = () => {
- this.setState({ grantStep: '' })
- }
-
- onSolution = () => {
- this.setState({ grantStep: 'complete' })
- }
-
- onComplete = () => {
- this.setState({ grantStep: '', grantShow: false })
- }
-
- render () {
- const { type, amount } = this.props
-
- return (
- <>
- {
- this.state.grantShow
- ?
- : null
- }
- {
- this.state.grantStep === 'captcha'
- ?
-
-
- : null
- }
- {
- this.state.grantStep === 'complete'
- ?
-
-
- : null
- }
- >
- )
- }
-}
-
-export default Grant
diff --git a/stories/features/rewards/settings/pageWallet.tsx b/stories/features/rewards/settings/pageWallet.tsx
deleted file mode 100644
index a2225591e..000000000
--- a/stories/features/rewards/settings/pageWallet.tsx
+++ /dev/null
@@ -1,394 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-
-// Components
-import { DetailRow as ContributeDetailRow } from '../../../../src/features/rewards/tableContribute'
-import { DetailRow as TransactionsRow } from '../../../../src/features/rewards/tableTransactions'
-
-import {
- ModalActivity,
- ModalBackupRestore,
- WalletEmpty,
- WalletOff,
- WalletSummary,
- WalletWrapper
-} from '../../../../src/features/rewards'
-import { WalletState } from '../../../../src/features/rewards/walletWrapper'
-import { WalletAddIcon, WalletWithdrawIcon } from '../../../../src/components/icons'
-
-// Assets
-const favicon = require('../../../assets/img/brave-favicon.png')
-const buzz = require('../../../assets/img/buzz.jpg')
-const ddgo = require('../../../assets/img/ddgo.jpg')
-const guardian = require('../../../assets/img/guardian.jpg')
-const wiki = require('../../../assets/img/wiki.jpg')
-
-export interface Props {
- grants: {
- tokens: string,
- expireDate: string,
- type: string
- }[]
- content: 'empty' | 'summary' | 'off'
- walletState: WalletState
-}
-
-interface State {
- activeTabId: number
- modalBackup: boolean
- modalActivity: boolean
-}
-
-const doNothing = () => {
- console.log('nothing')
-}
-
-class PageWallet extends React.Component {
- constructor (props: Props) {
- super(props)
- this.state = {
- activeTabId: 0,
- modalBackup: false,
- modalActivity: false
- }
- }
-
- get activityContributions (): ContributeDetailRow[] {
- return [
- {
- profile: {
- name: 'Jonathon Doe',
- verified: true,
- provider: 'youtube',
- src: favicon
- },
- url: 'https://brave.com',
- attention: 40,
- onRemove: doNothing,
- token: {
- value: '5.0',
- converted: '5.00'
- }
- },
- {
- profile: {
- name: 'duckduckgo.com',
- verified: true,
- src: ddgo
- },
- url: 'https://brave.com',
- attention: 20,
- onRemove: doNothing,
- token: {
- value: '4.0',
- converted: '11.00'
- }
- },
- {
- profile: {
- name: 'buzzfeed.com',
- verified: false,
- src: buzz
- },
- url: 'https://brave.com',
- attention: 10,
- onRemove: doNothing,
- token: {
- value: '3.0',
- converted: '15.00'
- }
- },
- {
- profile: {
- name: 'theguardian.com',
- verified: true,
- src: guardian
- },
- url: 'https://brave.com',
- attention: 5,
- onRemove: doNothing,
- token: {
- value: '2.0',
- converted: '17.00'
- }
- },
- {
- profile: {
- name: 'wikipedia.org',
- verified: false,
- src: wiki
- },
- url: 'https://brave.com',
- attention: 4,
- onRemove: doNothing,
- token: {
- value: '1.0',
- converted: '11.00'
- }
- }
- ]
- }
-
- get activityTransactions (): TransactionsRow[] {
- return [
- {
- date: '6/1',
- type: 'deposit',
- description: 'Brave Ads payment for May',
- amount: {
- value: '5.0',
- converted: '5.00'
- }
- },
- {
- date: '6/9',
- type: 'tipOnLike',
- description: {
- publisher: 'Jonathon Doe',
- platform: 'YouTube'
- },
- amount: {
- isNegative: true,
- value: '5.0',
- converted: '11.00'
- }
- },
- {
- date: '6/10',
- type: 'deposit',
- description: 'Token grant made available or unlocked',
- amount: {
- value: '10.0',
- converted: '15.00'
- }
- },
- {
- date: '6/12',
- type: 'donation',
- description: 'coinmarketcap.com',
- amount: {
- isNegative: true,
- value: '10.0',
- converted: '15.00'
- }
- },
- {
- date: '6/14',
- type: 'tipOnLike',
- description: {
- publisher: 'BrendanEich',
- platform: 'Twitter'
- },
- amount: {
- isNegative: true,
- value: '1.0',
- converted: '2.00'
- }
- },
- {
- date: '6/26',
- type: 'deposit',
- description: 'Added via Uphold',
- amount: {
- value: '10.0',
- converted: '15.00'
- }
- },
- {
- date: '6/31',
- type: 'contribute',
- description: 'Monthly payment',
- amount: {
- isNegative: true,
- value: '10.0',
- converted: '15.00'
- }
- },
- {
- date: '6/31',
- type: 'recurringDonation',
- description: 'Monthly payment',
- amount: {
- isNegative: true,
- value: '5.0',
- converted: '15.00'
- }
- }
- ]
- }
-
- onBackupTabChange = () => {
- const newId = this.state.activeTabId === 0 ? 1 : 0
- this.setState({ activeTabId: newId })
- }
-
- onBackupModalClose = () => {
- this.setState({ modalBackup: false })
- }
-
- onBackupModalOpen = () => {
- this.setState({ modalBackup: true })
- }
-
- onActivity = () => {
- this.setState({ modalActivity: true })
- }
-
- onActivityClose = () => {
- this.setState({ modalActivity: false })
- }
-
- render () {
- const { content, walletState, grants } = this.props
- const self = this
-
- return (
- <>
- ,
- testId: 'panel-add-funds'
- },
- {
- name: 'Withdraw Funds',
- action: doNothing,
- icon:
- }
- ]}
- compact={false}
- contentPadding={false}
- onSettingsClick={this.onBackupModalOpen}
- onActivityClick={doNothing}
- showCopy={true}
- showSecActions={true}
- grants={grants}
- walletState={walletState}
- >
- {
- content === 'empty' ? : null
- }
- {
- content === 'summary'
- ?
- : null
- }
- {
- content === 'off' ? : null
- }
-
- {
- this.state.modalBackup
- ?
- : null
- }
- {
- this.state.modalActivity
- ?
- : null
- }
- >
- )
- }
-}
-
-export default PageWallet
diff --git a/stories/features/rewards/settings/settings.tsx b/stories/features/rewards/settings/settings.tsx
deleted file mode 100644
index 18db85fff..000000000
--- a/stories/features/rewards/settings/settings.tsx
+++ /dev/null
@@ -1,76 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-
-// Components
-import AdsBox from './adsBox'
-import ContributeBox from './contributeBox'
-import DonationsBox from './donationsBox'
-import Grant from './grant'
-import PageWallet, { Props as WalletProps } from './pageWallet'
-import { Grid, Column } from '../../../../src/components'
-import { DisabledBox, MainToggle, SettingsPage } from '../../../../src/features/rewards'
-
-// Assets
-import '../../../assets/fonts/muli.css'
-import '../../../assets/fonts/poppins.css'
-
-export interface Props {
- walletProps: WalletProps
-}
-
-interface State {
- mainToggle: boolean
-}
-
-class Settings extends React.PureComponent {
- constructor (props: Props) {
- super(props)
- this.state = {
- mainToggle: true
- }
- }
-
- doNothing = () => {
- console.log('nothing')
- }
-
- onMainToggle = () => {
- this.setState({ mainToggle: !this.state.mainToggle })
- }
-
- render () {
- const { walletProps } = this.props
- return (
-
-
-
-
- {
- !this.state.mainToggle
- ?
- : null
- }
-
-
-
-
-
-
-
-
-
-
-
- )
- }
-}
-
-export default Settings
diff --git a/stories/features/rewards/settingsMobile/adsBoxMobile.tsx b/stories/features/rewards/settingsMobile/adsBoxMobile.tsx
deleted file mode 100644
index 025bdfaf7..000000000
--- a/stories/features/rewards/settingsMobile/adsBoxMobile.tsx
+++ /dev/null
@@ -1,73 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-
-// Components
-import { StyledListContent } from './style'
-import { Select } from '../../../../src/components'
-import { Tokens, List } from '../../../../src/features/rewards'
-import { BoxMobile } from '../../../../src/features/rewards/mobile'
-
-// Utils
-import locale from './fakeLocale'
-
-interface Props {
- rewardsEnabled: boolean
-}
-
-interface State {
- adsToggle: boolean
-}
-
-class AdsBoxMobile extends React.Component {
- constructor (props: Props) {
- super(props)
- this.state = {
- adsToggle: true
- }
- }
-
- onAdsToggle = () => {
- this.setState({
- adsToggle: !this.state.adsToggle
- })
- }
-
- render () {
- const checked = this.props.rewardsEnabled && this.state.adsToggle
-
- return (
- Ads Settings content}
- >
- {locale.adsEarnings}}>
-
-
-
-
- {locale.adsDisplayed}}>
-
-
-
-
-
- )
- }
-}
-
-export default AdsBoxMobile
diff --git a/stories/features/rewards/settingsMobile/contributeBoxMobile.tsx b/stories/features/rewards/settingsMobile/contributeBoxMobile.tsx
deleted file mode 100644
index f45644739..000000000
--- a/stories/features/rewards/settingsMobile/contributeBoxMobile.tsx
+++ /dev/null
@@ -1,347 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-
-// Components
-import {
- List,
- NextContribution,
- TableContribute,
- Tokens
-} from '../../../../src/features/rewards'
-import {
- StyledListContent,
- StyledSitesNum,
- StyledTotalContent,
- StyledSitesLink,
- StyledMobileSettingsContainer
-} from './style'
-import { ControlWrapper, Checkbox } from '../../../../src/components'
-import { BoxMobile, SelectMobile } from '../../../../src/features/rewards/mobile'
-import { DetailRow as ContributeDetailRow } from '../../../../src/features/rewards/tableContribute'
-
-// Utils
-import locale from './fakeLocale'
-
-// Assets
-const favicon = require('../../../assets/img/brave-favicon.png')
-const buzz = require('../../../assets/img/buzz.jpg')
-const ddgo = require('../../../assets/img/ddgo.jpg')
-const guardian = require('../../../assets/img/guardian.jpg')
-const wiki = require('../../../assets/img/wiki.jpg')
-
-interface Props {
- rewardsEnabled: boolean
-}
-
-interface State {
- allSitesShown: boolean
- contributeToggle: boolean
-}
-
-class ContributeBoxMobile extends React.Component {
- constructor (props: Props) {
- super(props)
- this.state = {
- allSitesShown: false,
- contributeToggle: true
- }
- }
-
- onContributeToggle = () => {
- this.setState({
- contributeToggle: !this.state.contributeToggle
- })
- }
-
- onSitesShownToggle = () => {
- this.setState({
- allSitesShown: !this.state.allSitesShown
- })
- }
-
- onSelectSettingChange = (key: string, value: string) => {
- console.log(`${key} is now ${value}`)
- }
-
- doNothing = () => {
- console.log('nothing')
- }
-
- contributeSettingsChild = () => {
- return (
-
-
-
-
-
-
-
-
-
-
-
-
- {locale.contributionNonVerified}
- {locale.contributionVideos}
-
-
-
- )
- }
-
- get contributeRows (): ContributeDetailRow[] {
- return [
- {
- profile: {
- name: 'Jonathon Doe',
- verified: true,
- provider: 'youtube',
- src: favicon
- },
- url: 'https://brave.com',
- attention: 40,
- onRemove: this.doNothing
- },
- {
- profile: {
- name: 'duckduckgo.com',
- verified: true,
- src: ddgo
- },
- url: 'https://brave.com',
- attention: 20,
- onRemove: this.doNothing
- },
- {
- profile: {
- name: 'buzzfeed.com',
- verified: false,
- src: buzz
- },
- url: 'https://brave.com',
- attention: 10,
- onRemove: this.doNothing
- },
- {
- profile: {
- name: 'theguardian.com',
- verified: true,
- src: guardian
- },
- url: 'https://brave.com',
- attention: 5,
- onRemove: this.doNothing
- },
- {
- profile: {
- name: 'wikipedia.org',
- verified: false,
- src: wiki
- },
- url: 'https://brave.com',
- attention: 4,
- onRemove: this.doNothing
- },
- {
- profile: {
- name: 'duckduckgo.com',
- verified: true,
- src: ddgo
- },
- url: 'https://brave.com',
- attention: 20,
- onRemove: this.doNothing
- },
- {
- profile: {
- name: 'buzzfeed.com',
- verified: false,
- src: buzz
- },
- url: 'https://brave.com',
- attention: 10,
- onRemove: this.doNothing
- },
- {
- profile: {
- name: 'theguardian.com',
- verified: true,
- src: guardian
- },
- url: 'https://brave.com',
- attention: 5,
- onRemove: this.doNothing
- },
- {
- profile: {
- name: 'wikipedia.org',
- verified: false,
- src: wiki
- },
- url: 'https://brave.com',
- attention: 4,
- onRemove: this.doNothing
- }
- ]
- }
-
- render () {
- const prefix = this.state.allSitesShown
- ? locale.contributionHideAll
- : locale.contributionSeeAll
- const shownRows = this.state.allSitesShown
- ? this.contributeRows
- : this.contributeRows.slice(0, 5)
- const checked = this.props.rewardsEnabled && this.state.contributeToggle
-
- return (
-
- {locale.contributionMonthly}}>
-
-
-
-
- {locale.contributionNextDate}}>
-
- July 25th
-
-
- {locale.contributionSitesNum}}>
-
- Total
-
-
-
-
-
-
-
- {prefix} {this.contributeRows.length} {locale.contributionSitesSuffix}
-
-
-
- )
- }
-}
-
-export default ContributeBoxMobile
diff --git a/stories/features/rewards/settingsMobile/donationsBoxMobile.tsx b/stories/features/rewards/settingsMobile/donationsBoxMobile.tsx
deleted file mode 100644
index f49940771..000000000
--- a/stories/features/rewards/settingsMobile/donationsBoxMobile.tsx
+++ /dev/null
@@ -1,155 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-
-// Components
-import { StyledListContent } from './style'
-import { BoxMobile } from '../../../../src/features/rewards/mobile'
-import { TableDonation, Tokens, List } from '../../../../src/features/rewards'
-import { DetailRow as DonationDetailRow } from '../../../../src/features/rewards/tableDonation'
-import { Column, Grid, Checkbox, ControlWrapper } from '../../../../src/components'
-
-// Utils
-import locale from './fakeLocale'
-
-// Assets
-const favicon = require('../../../assets/img/brave-favicon.png')
-const eich = require('../../../assets/img/eich.jpg')
-const guardian = require('../../../assets/img/guardian.jpg')
-
-type Check = { yt: boolean, tw: boolean, inst: boolean }
-
-interface Props {
- rewardsEnabled: boolean
-}
-
-interface State {
- check: Check
-}
-
-class DonationsBoxMobile extends React.Component {
- constructor (props: Props) {
- super(props)
- this.state = {
- check: {
- yt: true,
- tw: false,
- inst: false
- }
- }
- }
-
- doNothing = () => {
- console.log('nothing')
- }
-
- get donationRows (): DonationDetailRow[] {
- return [
- {
- profile: {
- name: 'Jonathon Doe',
- verified: true,
- provider: 'youtube',
- src: favicon
- },
- url: 'https://brave.com',
- type: 'recurring',
- contribute: {
- tokens: '2.0',
- converted: '0.20'
- },
- onRemove: this.doNothing
- },
- {
- profile: {
- verified: false,
- name: 'theguardian.com',
- src: guardian
- },
- url: 'https://brave.com',
- type: 'donation',
- contribute: {
- tokens: '12.0',
- converted: '6.20'
- },
- text: 'May 7'
- },
- {
- profile: {
- verified: false,
- name: 'BrendanEich',
- provider: 'twitter',
- src: eich
- },
- url: 'https://brave.com',
- type: 'tip',
- contribute: {
- tokens: '7.0',
- converted: '3.20'
- },
- text: 'May 2'
- }
- ]
- }
-
- onChange = (key: string, selected: boolean, child: React.ReactNode, all: { [key: string]: boolean }) => {
- this.setState({
- check: all as Check
- })
- }
-
- donationSettingsChild = () => {
- return (
- <>
-
-
-
-
- YouTube
- Twitter
- Reddit
- Instagram
-
-
-
-
- >
- )
- }
-
- render () {
- return (
-
- {locale.donationTotal}}>
-
-
-
-
-
-
- Please visit some sites
-
-
-
- )
- }
-}
-
-export default DonationsBoxMobile
diff --git a/stories/features/rewards/settingsMobile/fakeLocale.ts b/stories/features/rewards/settingsMobile/fakeLocale.ts
deleted file mode 100644
index 21a2e69d9..000000000
--- a/stories/features/rewards/settingsMobile/fakeLocale.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-const locale = {
- adsDesc: 'Earn tokens by seeing ads on Brave. Ads are matched from machine learning and the data temporarily present in your browser without tracking your information or sending it outside.',
- adsDisabledText: 'Coming soon',
- adsDisplayed: 'Ads displayed',
- adsEarnings: 'Earnings this month',
- adsFreq: 'Ad Frequency',
- adsMode: 'Ad mode',
- adsTitle: 'Brave Ads',
- contributionAllowed: 'What should be allowed?',
- contributionDesc: 'A simple way to support content creators. Set monthly allowance and browse normally. Your favorite sites (content sites only) receive your contributions automatically. You can exclude sites from funding here.',
- contributionHideAll: 'Hide all',
- contributionMinTime: 'Minimum page time before logging a visit',
- contributionMinVisits: 'Minimum visits for publisher relevancy',
- contributionMonthly: 'Monthly budget',
- contributionNextDate: 'Next contribution date',
- contributionNonVerified: 'Allow contribution to non-verified sites',
- contributionSeeAll: 'See all',
- contributionSites: 'Supported sites',
- contributionSitesNum: 'Sites you\'re supporting',
- contributionSitesSuffix: 'sites',
- contributionTime5: '5 seconds',
- contributionTime60: '60 seconds',
- contributionTime8: '8 seconds',
- contributionTitle: 'Brave Contribute',
- contributionVideos: 'Allow contribution to videos',
- contributionVisit10: '10 visits',
- contributionVisit1: '1 visit',
- contributionVisit5: '5 visits',
- donationDesc: 'Tip content creators directly as you browse or give tips to videos and tweets that you ‘like’. You can also set up recurring monthly tips so you can support sites continuously.',
- donationTitle: 'Tips',
- donationTotal: 'Total tips this month',
- rewardsDisabledDescOne: 'With conventional browsers, you pay to browse the web by viewing ads with your valuable attention, spending your valuable time downloading invasive ad technology, that transmits your valuable private data to advertisers — without your consent.',
- rewardsDisabledDescTwo: 'Today, Brave welcomes you to the new internet. One where your time is valued, your personal data is kept private, and you actually get paid for your attention.',
- whyBraveRewards: 'Why Brave Rewards?'
-}
-
-export default locale
diff --git a/stories/features/rewards/settingsMobile/grantMobile.tsx b/stories/features/rewards/settingsMobile/grantMobile.tsx
deleted file mode 100644
index a7bdf3450..000000000
--- a/stories/features/rewards/settingsMobile/grantMobile.tsx
+++ /dev/null
@@ -1,96 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-
-// Components
-import {
- GrantClaim,
- GrantComplete,
- GrantWrapper
-} from '../../../../src/features/rewards'
-import { Type } from '../../../../src/features/rewards/grantClaim'
-
-type Step = '' | 'complete'
-
-interface State {
- grantShow: boolean
- grantStep: Step
- loading: boolean
-}
-
-interface Props {
- type: Type
- amount?: string
-}
-
-class GrantMobile extends React.Component {
- constructor (props: Props) {
- super(props)
- this.state = {
- grantShow: true,
- grantStep: '',
- loading: false
- }
- }
-
- onGrantHide = () => {
- this.setState({ grantStep: '' })
- }
-
- onClaim = () => {
- this.setState({ loading: true })
- setTimeout(() => {
- this.setState({ grantStep: 'complete' })
- }, 2000)
- }
-
- onComplete = () => {
- this.setState({
- grantStep: '',
- grantShow: false,
- loading: false
- })
- }
-
- render () {
- const { type, amount } = this.props
-
- return (
- <>
- {
- this.state.grantShow
- ?
- : null
- }
- {
- this.state.grantStep === 'complete'
- ?
-
-
- : null
- }
- >
- )
- }
-}
-
-export default GrantMobile
diff --git a/stories/features/rewards/settingsMobile/mobileWalletPanel.tsx b/stories/features/rewards/settingsMobile/mobileWalletPanel.tsx
deleted file mode 100644
index 071d9555d..000000000
--- a/stories/features/rewards/settingsMobile/mobileWalletPanel.tsx
+++ /dev/null
@@ -1,129 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import { object } from '@storybook/addon-knobs'
-
-import { WalletEmpty, WalletWrapper } from '../../../../src/features/rewards'
-import { StyledWalletClose, StyledWalletOverlay, StyledWalletWrapper } from './style'
-import { CloseStrokeIcon, WalletAddIcon } from '../../../../src/components/icons'
-import ModalAddFunds, { Address } from '../../../../src/features/rewards/modalAddFunds'
-
-interface State {
- addFundsShown?: boolean
-}
-
-interface Props {
- visible?: boolean
- toggleAction: () => void
-}
-
-const doNothing = () => {
- console.log('nothing')
-}
-
-const notImplemented = () => {
- console.log('view not implemented')
-}
-
-class MobileWalletPanel extends React.Component {
- constructor (props: Props) {
- super(props)
-
- this.state = {
- addFundsShown: false
- }
- }
-
- toggleAddFunds = () => {
- this.setState({ addFundsShown: !this.state.addFundsShown })
- }
-
- get walletAddresses (): Address[] {
- return [
- {
- type: 'BTC',
- address: '17fBi3kyqUd2jjPDSi8ArBbMWso16qmxW5',
- qr: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALkAAAC5CAAAAABRxsGAAAABz0lEQVR42u3cQY7DIAwF0Nz/0u1uVgP5hqYV8Fh1lFF4qVRjbNrrteq4yMnJycnJycnJycnJyXeRX/ejfcO/q6X/q89GTn62PJiz+Wdz9v/uXJqNnJy8/blvRo9mLGg+V302cnLyAXm6jAfBiZyc/EF5kJ+n9yMnJ5/Pz4OZSnvu7+0syMmXlwdr+Qdffbk6R06+sjxu1YRpeD9f+EWHi5x8ZXnwuW8+QwAs1a3JycnjwJEm34OtpFJuT05+tjyIMkHtqm6bjy3k5MfI09JT0A5KL8THqcjJT5WnnddHwkqAJicnj/fDaa82zRzmO7nk5MfI+4SgxBz0eftv22hsISffVx6Ei9J0/TJYvQBNTk6ebJSDq6Os6bMW5OT7ypO1NzwhVdpf99MMcnLyuPP68HONrv7k5GfJSy2d+nY7jUHk5OQ38mDOWokqXP3nYws5+W7ydPRjUD3vLu25ycmPlV/3I60zB6cp+q/mO1zk5FvK04hSP9FU+qrAJ6tz5OS7yeuHK9IE4aoMcnLyUflgzCgVvsnJyedjS1oQSytq89U5cvLN5fWraWoerPTk5OTzv4FWf8z0uR6szpGTryxfYpCTk5OTk5OTk5OTk5OvON4QJEO8FpFK4QAAAABJRU5ErkJggg=='
- },
- {
- type: 'ETH',
- address: '0xF10bfc0EB8Fcfd1240a5BB97C3e5a7752cD1C388',
- qr: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAM0AAADNCAAAAAA+16u1AAACPklEQVR42u3bwU7DMBAE0P7/T8ONA1LcGXsTFfRyKpQ2+3IY2bvm9fWfrhcNDQ0NDQ0NDQ0NDQ0NDc2p5vX+6m7y84lfry6/ebMCGhqaSU1QW/CJX2+kT6KvgIaG5h7NZd5UubQu6/KbgwpoaGg+QNNn2iWYhobm72rSzwZxRkND81GatGex+bG14eHdGg0NTd/rvPnVw51bGhqajTHj8iZplWlL5O4pLg0NTbC7qIruextBqtLQ0DyiqQaYl8LL363Dbv04hlY2NDQ0qSYoK4ikILqC5c15ptHQ0FSa4E792HJzhHo08aChoTmeEfQ3Duae/RLqqMtBQ0NzsrIJGhebtfWtz/P9DQ0NTZVpgStY43T9yrBDQkND84imGmX2rYn10qiKMxoamnFNuhxJrZvnH9MGBw0NzbgmbWakZaVReHIaioaGZkhTRVe1sgkmKNXGh4aG5h7NzHQybWb0OXfU66ShoakmHsGwI9gMBXk4s8ahoaEZ0lSdy+CU08k/TQ0lNA0NzaYmaFqmG5X+EY13bmloaI4zbXOP0g871o9tKKFpaGjSTAuOL6Y90X7Pk8YZDQ3NpCZuKoQHodYxlbY5aWhontO83l/rP+6LmTlQTUNDM6lJkyzY7lSLpODJ0tDQPKfZLDCIs2p4Mtm5paGhuVmzLjrY5KQNTxoamo/XHGfaxgiGhoZmWpO+GxxcSmNq8+ADDQ3NuCbdbAQ/phuV4I9v7NzS0ND8g4uGhoaGhoaGhoaGhoaGhqa5vgFTleQ0sHcoKgAAAABJRU5ErkJggg=='
- },
- {
- type: 'BAT',
- address: '0xF10bfc0EB8Fcfd1240a5BB97C3e5a7752cD1C388',
- qr: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAM0AAADNCAAAAAA+16u1AAACPklEQVR42u3bwU7DMBAE0P7/T8ONA1LcGXsTFfRyKpQ2+3IY2bvm9fWfrhcNDQ0NDQ0NDQ0NDQ0NDc2p5vX+6m7y84lfry6/ebMCGhqaSU1QW/CJX2+kT6KvgIaG5h7NZd5UubQu6/KbgwpoaGg+QNNn2iWYhobm72rSzwZxRkND81GatGex+bG14eHdGg0NTd/rvPnVw51bGhqajTHj8iZplWlL5O4pLg0NTbC7qIruextBqtLQ0DyiqQaYl8LL363Dbv04hlY2NDQ0qSYoK4ikILqC5c15ptHQ0FSa4E792HJzhHo08aChoTmeEfQ3Duae/RLqqMtBQ0NzsrIJGhebtfWtz/P9DQ0NTZVpgStY43T9yrBDQkND84imGmX2rYn10qiKMxoamnFNuhxJrZvnH9MGBw0NzbgmbWakZaVReHIaioaGZkhTRVe1sgkmKNXGh4aG5h7NzHQybWb0OXfU66ShoakmHsGwI9gMBXk4s8ahoaEZ0lSdy+CU08k/TQ0lNA0NzaYmaFqmG5X+EY13bmloaI4zbXOP0g871o9tKKFpaGjSTAuOL6Y90X7Pk8YZDQ3NpCZuKoQHodYxlbY5aWhontO83l/rP+6LmTlQTUNDM6lJkyzY7lSLpODJ0tDQPKfZLDCIs2p4Mtm5paGhuVmzLjrY5KQNTxoamo/XHGfaxgiGhoZmWpO+GxxcSmNq8+ADDQ3NuCbdbAQ/phuV4I9v7NzS0ND8g4uGhoaGhoaGhoaGhoaGhqa5vgFTleQ0sHcoKgAAAABJRU5ErkJggg=='
- },
- {
- type: 'LTC',
- address: 'Le8aswhmGJjn9jP5teEWdyJARak4xU8sCn',
- qr: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAM0AAADNCAAAAAA+16u1AAACOUlEQVR42u3bQXLDIAwF0Nz/0u0FYvKFBNN0Hit7mtq8LDTwRV4//2m8aGhoaGhoaGhoaGhoaGhouprX57H+8LvnvbstPXT9DhoamnHNc+F4fNZyWmvX0AxoaGimNe/qyONf16UrqILBO2hoaL5Is4YESx4aGpov0pRK13prQ0ND86c0gbX0zvX0g/nS0NDc0wRJ4+Gry8ktDQ3NRptxL7ksTfBeF5eGhibYXQSR5mPtS/dBHTANDc2kJkguSwUrtbYaojQ0NEc06e1mSVq7gmCUhobmoCbIHIPOZsnVWd7Q0NCMa9Iwo9TZ3MgwwwyEhoZmXBN0MR+vgmVL50QEDQ3NPU2w4Ci1LUvdzsmUg4aGpt73TE8lBWlIqYhNdjxoaGg6fc/A1d6ZpKcjk7fR0NAMatJ5pM3PYPsU/Ec/s6GhoUlXNmlforRsqR9yCLqiNDQ045pSWekccCr1VvtZJw0NTSfrDEpXUBnTk9HpXouGhua0Zv3AzW7n+iMH+540NDT1rHN97LkejsRLlM9nrmloaO5pSpFmWr+Cn1qkSy0aGprLmtJpqHVcEViH9jc0NDQlTTo2s41SejF5oouGhqaTdaYlKbgKdk6lM9I0NDRnNEElS0OP9DtJ26o0NDT3NEG96fQvgv3Smd0aDQ3NoGZzPVPqc9DQ0PxlTTC3/orlc8BBQ0NzRpMGmeltUMTW3ywNDc09TZBPBH3PemFrlVEaGpoZzdcOGhoaGhoaGhoaGhoaGhqayvgFbnvHJxkVZlQAAAAASUVORK5CYII='
- }
- ]
- }
-
- render () {
- const { visible, toggleAction } = this.props
-
- if (!visible) {
- return null
- }
-
- return (
- <>
-
-
-
-
-
-
- }
- ]}
- compact={true}
- isMobile={true}
- onSettingsClick={notImplemented}
- onActivityClick={doNothing}
- showSecActions={true}
- grants={object('Claimed grants', [
- {
- tokens: '8.0',
- expireDate: '7/15/2018',
- type: 'ugp'
- },
- {
- tokens: '10.0',
- expireDate: '9/10/2018',
- type: 'ugp'
- },
- {
- tokens: '10.0',
- expireDate: '10/10/2018',
- type: 'ads'
- }
- ])}
- >
-
-
-
- {
- this.state.addFundsShown
- ?
- : null
- }
-
- >
- )
- }
-}
-
-export default MobileWalletPanel
diff --git a/stories/features/rewards/settingsMobile/settingsMobile.tsx b/stories/features/rewards/settingsMobile/settingsMobile.tsx
deleted file mode 100644
index db136b634..000000000
--- a/stories/features/rewards/settingsMobile/settingsMobile.tsx
+++ /dev/null
@@ -1,97 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-
-// Components
-import GrantMobile from './grantMobile'
-import AdsBoxMobile from './adsBoxMobile'
-import ContributeBoxMobile from './contributeBoxMobile'
-import DonationsBoxMobile from './donationsBoxMobile'
-import MobileWalletPanel from './mobileWalletPanel'
-import { StyledDisabledContent, StyledHeading, StyledText } from './style'
-import {
- MainToggleMobile,
- SettingsPageMobile,
- WalletInfoHeader
-} from '../../../../src/features/rewards/mobile'
-
-// Assets
-import '../../../assets/fonts/muli.css'
-import '../../../assets/fonts/poppins.css'
-
-// Utils
-import locale from './fakeLocale'
-
-interface State {
- mainToggle: boolean
- walletShown: boolean
-}
-
-class SettingsMobile extends React.PureComponent<{}, State> {
- constructor (props: {}) {
- super(props)
- this.state = {
- mainToggle: true,
- walletShown: false
- }
- }
-
- onMainToggle = () => {
- this.setState({ mainToggle: !this.state.mainToggle })
- }
-
- onToggleWallet = () => {
- this.setState({ walletShown: !this.state.walletShown })
- }
-
- render () {
- return (
-
-
- {
- !this.state.mainToggle
- ?
-
- {locale.whyBraveRewards}
-
-
- {locale.rewardsDisabledDescOne}
-
-
- {locale.rewardsDisabledDescTwo}
-
-
- : null
- }
-
-
-
-
-
-
-
-
- )
- }
-}
-
-export default SettingsMobile
diff --git a/stories/features/rewards/settingsMobile/style.ts b/stories/features/rewards/settingsMobile/style.ts
deleted file mode 100644
index 806e997bb..000000000
--- a/stories/features/rewards/settingsMobile/style.ts
+++ /dev/null
@@ -1,82 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License. v. 2.0. If a copy of the MPL was not distributed with this file.
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import styled from 'styled-components'
-
-export const StyledListContent = styled<{}, 'div'>('div')`
- padding: 0 24px;
-`
-
-export const StyledSitesNum = styled<{}, 'div'>('div')`
- padding: 24px;
-`
-
-export const StyledDisabledContent = styled<{}, 'div'>('div')`
- padding: 0px 5px;
-`
-
-export const StyledHeading = styled<{}, 'span'>('span')`
- font-size: 22px;
- font-weight: normal;
- letter-spacing: 0;
- line-height: 28px;
-`
-
-export const StyledSitesLink = styled<{}, 'a'>('a')`
- float: right;
- color: #4C54D2;
- font-size: 13px;
- letter-spacing: 0;
-`
-
-export const StyledText = styled<{}, 'p'>('p')`
- color: #838391;
- font-size: 14px;
- font-family: ${p => p.theme.fontFamily.body};
- font-weight: 300;
- letter-spacing: 0;
- line-height: 28px;
-`
-
-export const StyledTotalContent = styled<{}, 'div'>('div')`
- position: relative;
- padding-right: 25px;
-
- @media (max-width: 366px) {
- top: 11px;
- }
-`
-
-export const StyledWalletOverlay = styled<{}, 'div'>('div')`
- display: flex;
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background: ${p => p.theme.color.modalOverlayBackground};
- align-items: center;
- z-index: 999;
- justify-content: center;
-`
-
-export const StyledWalletWrapper = styled<{}, 'div'>('div')`
- height: 90vh;
- overflow-y: scroll;
- width: 90%;
- margin-top: 40px;
-`
-
-export const StyledWalletClose = styled<{}, 'div'>('div')`
- top: 15px;
- right: 15px;
- position: fixed;
- color: ${p => p.theme.color.subtleExclude};
- width: 25px;
-`
-
-export const StyledMobileSettingsContainer = styled('div')`
- display: flex;
- flex-direction: column;
-`
diff --git a/stories/features/rewards/table.tsx b/stories/features/rewards/table.tsx
deleted file mode 100644
index 7a6e0651e..000000000
--- a/stories/features/rewards/table.tsx
+++ /dev/null
@@ -1,269 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import { storiesOf } from '@storybook/react'
-import { withKnobs, boolean, object, number } from '@storybook/addon-knobs'
-import centered from '@storybook/addon-centered'
-
-// Components
-import TableContribute, { DetailRow as ContributeDetailRow } from '../../../src/features/rewards/tableContribute'
-import TableDonation, { DetailRow as DonationDetailRow } from '../../../src/features/rewards/tableDonation'
-import TableTransactions, { DetailRow as TransactionsRow } from '../../../src/features/rewards/tableTransactions'
-import TablePending, { DetailRow as PendingDetailRow } from '../../../src/features/rewards/tablePending'
-
-const favicon = require('../../assets/img/brave-favicon.png')
-const ddgo = require('../../assets/img/ddgo.jpg')
-const wiki = require('../../assets/img/wiki.jpg')
-const buzz = require('../../assets/img/buzz.jpg')
-const guardian = require('../../assets/img/guardian.jpg')
-const eich = require('../../assets/img/eich.jpg')
-
-const doNothing = () => {
- console.log('nothing')
-}
-
-storiesOf('Feature Components/Rewards/Table', module)
- .addDecorator(withKnobs)
- .addDecorator(centered)
- .add('Contribution', () => {
- const header: string[] = [
- 'Site',
- 'Attention'
- ]
-
- const rows: ContributeDetailRow[] = [
- {
- profile: {
- name: 'Jonathon Doe',
- verified: true,
- provider: 'youtube',
- src: favicon
- },
- url: 'https://brave.com',
- attention: 40,
- onRemove: doNothing
- },
- {
- profile: {
- name: 'duckduckgo.com',
- verified: true,
- src: ddgo
- },
- url: 'https://brave.com',
- attention: 20,
- onRemove: doNothing
- },
- {
- profile: {
- name: 'buzzfeed.com',
- verified: false,
- src: buzz
- },
- url: 'https://brave.com',
- attention: 10,
- onRemove: doNothing
- },
- {
- profile: {
- name: 'theguardian.com',
- verified: true,
- src: guardian
- },
- url: 'https://brave.com',
- attention: 5,
- onRemove: doNothing
- },
- {
- profile: {
- name: 'wikipedia.org',
- verified: false,
- src: wiki
- },
- url: 'https://brave.com',
- attention: 4,
- onRemove: doNothing
- }
- ]
- return (
-
-
- Please visit some sites
-
-
- )
- })
- .add('Donation', () => {
- const rows: DonationDetailRow[] = [
- {
- profile: {
- name: 'Jonathon Doe',
- verified: true,
- provider: 'youtube',
- src: favicon
- },
- url: 'https://brave.com',
- type: 'recurring',
- contribute: {
- tokens: '2.0',
- converted: '0.20'
- },
- onRemove: doNothing
- },
- {
- profile: {
- verified: false,
- name: 'theguardian.com',
- src: guardian
- },
- url: 'https://brave.com',
- type: 'donation',
- contribute: {
- tokens: '12000.0',
- converted: '6000.20'
- },
- text: 'May 7'
- },
- {
- profile: {
- verified: false,
- name: 'BrendanEich',
- provider: 'twitter',
- src: eich
- },
- url: 'https://brave.com',
- type: 'tip',
- contribute: {
- tokens: '1.0',
- converted: '0.20'
- },
- text: 'May 2'
- }
- ]
- return (
-
-
- Please visit some sites
-
-
- )
- })
- .add('Transactions', () => {
- const rows: TransactionsRow[] = [
- {
- date: '6/1',
- type: 'deposit',
- description: 'Brave Ads payment for May',
- amount: {
- value: '5.0',
- converted: '5.00'
- }
- },
- {
- date: '6/9',
- type: 'tipOnLike',
- description: {
- publisher: 'Jonathon Doe',
- platform: 'YouTube'
- },
- amount: {
- isNegative: true,
- value: '5.0',
- converted: '11.00'
- }
- },
- {
- date: '6/31',
- type: 'contribute',
- description: 'Monthly payment',
- amount: {
- isNegative: true,
- value: '5.0',
- converted: '15.00'
- }
- }
- ]
- return (
-
-
- Sorry no transactions.
-
-
- )
- })
- .add('Pending contributions',() => {
- const rows: PendingDetailRow[] = [
- {
- profile: {
- name: 'Jonathon Doe',
- verified: true,
- provider: 'youtube',
- src: favicon
- },
- url: 'https://brave.com',
- type: 'recurring',
- amount: {
- tokens: '2.0',
- converted: '0.20'
- },
- date: 'Jan 2',
- onRemove: doNothing
- },
- {
- profile: {
- verified: false,
- name: 'theguardian.com',
- src: guardian
- },
- url: 'https://brave.com',
- type: 'tip',
- amount: {
- tokens: '12000.0',
- converted: '6000.20'
- },
- date: 'May 7',
- onRemove: doNothing
- },
- {
- profile: {
- verified: false,
- name: 'BrendanEich',
- provider: 'twitter',
- src: eich
- },
- url: 'https://brave.com',
- type: 'ac',
- amount: {
- tokens: '1.0',
- converted: '0.20'
- },
- date: 'May 2',
- onRemove: doNothing
- }
- ]
- return (
-
-
- Please visit some sites
-
-
- )
- })
diff --git a/stories/features/rewards/wallet.tsx b/stories/features/rewards/wallet.tsx
deleted file mode 100644
index 460528784..000000000
--- a/stories/features/rewards/wallet.tsx
+++ /dev/null
@@ -1,200 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import * as React from 'react'
-import { storiesOf } from '@storybook/react'
-import { withKnobs, object, text, select, boolean, number } from '@storybook/addon-knobs'
-import centered from '@storybook/addon-centered'
-
-// Components
-import { WalletSummary, WalletEmpty, WalletOff, WalletPanel, WalletSummarySlider, WalletWrapper } from '../../../src/features/rewards'
-import { AlertWallet, Notification, WalletState } from '../../../src/features/rewards/walletWrapper'
-import { WalletAddIcon, WalletImportIcon } from '../../../src/components/icons'
-import { WalletInfoHeader } from '../../../src/features/rewards/mobile'
-
-const favicon = require('../../assets/img/brave-favicon.png')
-
-const doNothing = () => {
- console.log('nothing')
-}
-
-storiesOf('Feature Components/Rewards/Wallet/Desktop', module)
- .addDecorator(withKnobs)
- .addDecorator(centered)
- .add('Wrapper', () => {
- const onEnableAds = () => {
- console.log('enabling ads')
- }
- const alert: AlertWallet = {
- node: 'Some text',
- type: 'success',
- onAlertClose: doNothing
- }
- const adsLaunchNotification: Notification = {
- id: '001',
- type: 'ads-launch',
- onCloseNotification: doNothing,
- text: Now you can earn by viewing ads.
- }
- const showAlert = boolean('Show alert', false)
- const showGrant = boolean('Show grants', false)
-
- return (
-
- },
- {
- name: 'Withdraw Funds',
- action: doNothing,
- icon:
- }
- ]}
- grants={showGrant ? [
- {
- tokens: '8.0',
- expireDate: '7/15/2018',
- type: 'ugp'
- },
- {
- tokens: '10.0',
- expireDate: '9/10/2018',
- type: 'ugp'
- },
- {
- tokens: '10.0',
- expireDate: '10/10/2018',
- type: 'ads'
- }
- ] : []}
- alert={showAlert ? alert : undefined}
- walletState={select('wallet status', {
- unverified: 'unverified',
- connected: 'connected',
- verified: 'verified',
- 'disconnected unverified': 'disconnected_unverified',
- 'disconnected verified': 'disconnected_verified'
- }, 'unverified') as WalletState}
- onDisconnectClick={doNothing}
- userName={'Brave Software'}
- >
- Some content
-
- )
- })
- .add('Empty', () => {
- return (
-
-
-
- )
- })
- .add('Summary', () => {
- return (
-
-
-
- )
- })
- .add('Panel', () => {
- return (
-
- ('Provider', { youtube: 'youtube', twitter: 'twitter', twitch: 'twitch', reddit: 'reddit', vimeo: 'vimeo', github: 'github' }, 'youtube')}
- publisherImg={favicon}
- publisherName={'Jonathan Doe'}
- monthlyAmount={'10.0'}
- isVerified={boolean('Verified', true)}
- tipsEnabled={boolean('Tips Enabled', true)}
- includeInAuto={boolean('Include in monthly', true)}
- acEnabled={boolean('AC enabled?', true)}
- attentionScore={'15'}
- donationAmounts={
- [
- {
- tokens: '0.0',
- converted: '0.00'
- },
- {
- tokens: '1.0',
- converted: '0.50'
- },
- {
- tokens: '5.0',
- converted: '2.50'
- },
- {
- tokens: '10.0',
- converted: '5.00'
- }
- ]
- }
- onToggleTips={doNothing}
- donationAction={doNothing}
- onAmountChange={doNothing}
- onIncludeInAuto={doNothing}
- showUnVerified={boolean('Show unverified content', true)}
- onRefreshPublisher={doNothing}
- />
-
- )
- })
- .add('Off', () => {
- return (
-
-
-
- )
- })
- .add('Summary Slider', () => {
- return (
-
-
-
- )
- })
-storiesOf('Feature Components/Rewards/Wallet/Mobile', module)
- .addDecorator(withKnobs)
- .addDecorator(centered)
- .add('Wallet Info Header', () => {
- return (
-
- )
- })