Skip to content

Commit

Permalink
Merge pull request #5644 from brave/remove-day
Browse files Browse the repository at this point in the history
Removes payment day from monthly statement
  • Loading branch information
NejcZdovc authored May 26, 2020
2 parents cf970d3 + 96b2b48 commit 81eb232
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 35 deletions.
1 change: 0 additions & 1 deletion .storybook/locale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ const locale: Record<string, string> = {
openAdsHistory: 'Show Ads History',
openBalance: 'Opening Balance',
payment: 'Payment',
paymentMonthly: 'Payment made every {{day}}th day in each month.',
paymentNotMade: 'Payment not made.',
pendingContributions: 'Pending Contributions',
pendingContributionEmpty: 'No pending contributions…',
Expand Down
1 change: 0 additions & 1 deletion browser/ui/webui/brave_webui_source.cc
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,6 @@ void CustomizeWebUIHTMLSource(const std::string &name,
{ "openAdsHistory", IDS_BRAVE_UI_OPEN_ADS_HISTORY },
{ "optOutTooltip", IDS_BRAVE_UI_ADS_OPT_OUT_TOOLTIP },
{ "payment", IDS_BRAVE_UI_PAYMENT },
{ "paymentMonthly", IDS_BRAVE_UI_PAYMENT_MONTHLY },
{ "paymentNotMade", IDS_BRAVE_UI_PAYMENT_NOT_MADE },
{ "pendingContributions", IDS_BRAVE_UI_PENDING_CONTRIBUTIONS },
{ "pendingContributionEmpty", IDS_BRAVE_UI_PENDING_CONTRIBUTION_EMPTY },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -718,18 +718,12 @@ class PageWallet extends React.Component<Props, State> {
}

generateMonthlyReport = () => {
const {
monthlyReport,
ui,
reconcileStamp
} = this.props.rewardsData
const { monthlyReport, ui } = this.props.rewardsData

if (!monthlyReport || monthlyReport.year === -1 || monthlyReport.month === -1) {
return undefined
}

const paymentDay = new Intl.DateTimeFormat('default', { day: 'numeric' }).format(reconcileStamp * 1000)

return (
<ModalActivity
onlyAnonWallet={ui.onlyAnonWallet}
Expand All @@ -739,7 +733,6 @@ class PageWallet extends React.Component<Props, State> {
months={this.getMonthlyReportDropDown()}
onClose={this.onModalActivityToggle}
onMonthChange={this.onModalActivityAction.bind(this,'onMonthChange')}
paymentDay={parseInt(paymentDay, 10)}
/>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ import {
StyledActionIcon,
Tabs,
Tab,
TabContent,
PaymentMonthly
TabContent
} from './style'
import TableActivity, { DetailRow as ActivityRow } from '../tableActivity'
import TableTransactions, { DetailRow as TransactionRow } from '../tableTransactions'
Expand Down Expand Up @@ -59,7 +58,6 @@ export interface Props {
transactionRows: TransactionRow[]
id?: string
summary: SummaryItem[]
paymentDay: number,
onlyAnonWallet?: boolean
}

Expand Down Expand Up @@ -194,7 +192,7 @@ export default class ModalActivity extends React.PureComponent<Props, State> {
}

getMonthlyContributionTable = () => {
const { activityRows, paymentDay } = this.props
const { activityRows } = this.props
const rows = activityRows.filter(row => row.type === 'monthly')

return (
Expand All @@ -204,15 +202,12 @@ export default class ModalActivity extends React.PureComponent<Props, State> {
>
{getLocale('noActivity')}
</TableActivity>
<PaymentMonthly>
{getLocale('paymentMonthly', { day: paymentDay })}
</PaymentMonthly>
</>
)
}

getAutoContributeTable = () => {
const { activityRows, paymentDay } = this.props
const { activityRows } = this.props
const rows = activityRows.filter(row => row.type === 'contribute')

return (
Expand All @@ -222,9 +217,6 @@ export default class ModalActivity extends React.PureComponent<Props, State> {
>
{getLocale('noActivity')}
</TableActivity>
<PaymentMonthly>
{getLocale('paymentMonthly', { day: paymentDay })}
</PaymentMonthly>
</>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,3 @@ export const Tab = styled<TabProps, 'button'>('button')`

export const TabContent = styled<{}, 'div'>('div')`
`

export const PaymentMonthly = styled<{}, 'p'>('p')`
font-size: 14px;
font-weight: 300;
letter-spacing: 0.2px;
color: #4b4c5c;
text-transform: none;
padding: 0px;
margin: -8px 0 24px;
display: block;
`
1 change: 0 additions & 1 deletion components/brave_rewards/resources/ui/stories/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ storiesOf('Rewards/Modal', module)
}
}
]}
paymentDay={12}
/>
)
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,6 @@ class PageWallet extends React.Component<Props, State> {
}
}
]}
paymentDay={12}
/>
: null
}
Expand Down
1 change: 0 additions & 1 deletion components/resources/brave_components_strings.grd
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,6 @@
<message name="IDS_BRAVE_UI_OPEN_BALANCE" desc="">Opening Balance</message>
<message name="IDS_BRAVE_UI_OPEN_ADS_HISTORY" desc="">7-day Ads History</message>
<message name="IDS_BRAVE_UI_PAYMENT" desc="">Payment</message>
<message name="IDS_BRAVE_UI_PAYMENT_MONTHLY" desc="">Payment made every {{day}}th each month.</message>
<message name="IDS_BRAVE_UI_PAYMENT_NOT_MADE" desc="">Payment not made.</message>
<message name="IDS_BRAVE_UI_PAYMENT_PINNED_SITES_HEADER" desc="">Pinned sites are now</message>
<message name="IDS_BRAVE_UI_PAYMENT_PINNED_SITES_MSG" desc="">Here's how monthly contributions work:</message>
Expand Down

0 comments on commit 81eb232

Please sign in to comment.