Skip to content

Commit 96b2b48

Browse files
committed
Removes payment day from monthly statement
Resolves brave/brave-browser#8960
1 parent ea57e92 commit 96b2b48

File tree

8 files changed

+4
-35
lines changed

8 files changed

+4
-35
lines changed

.storybook/locale.ts

-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ const locale: Record<string, string> = {
144144
openAdsHistory: 'Show Ads History',
145145
openBalance: 'Opening Balance',
146146
payment: 'Payment',
147-
paymentMonthly: 'Payment made every {{day}}th day in each month.',
148147
paymentNotMade: 'Payment not made.',
149148
pendingContributions: 'Pending Contributions',
150149
pendingContributionEmpty: 'No pending contributions…',

browser/ui/webui/brave_webui_source.cc

-1
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,6 @@ void CustomizeWebUIHTMLSource(const std::string &name,
529529
{ "openAdsHistory", IDS_BRAVE_UI_OPEN_ADS_HISTORY },
530530
{ "optOutTooltip", IDS_BRAVE_UI_ADS_OPT_OUT_TOOLTIP },
531531
{ "payment", IDS_BRAVE_UI_PAYMENT },
532-
{ "paymentMonthly", IDS_BRAVE_UI_PAYMENT_MONTHLY },
533532
{ "paymentNotMade", IDS_BRAVE_UI_PAYMENT_NOT_MADE },
534533
{ "pendingContributions", IDS_BRAVE_UI_PENDING_CONTRIBUTIONS },
535534
{ "pendingContributionEmpty", IDS_BRAVE_UI_PENDING_CONTRIBUTION_EMPTY },

components/brave_rewards/resources/page/components/pageWallet.tsx

+1-8
Original file line numberDiff line numberDiff line change
@@ -718,18 +718,12 @@ class PageWallet extends React.Component<Props, State> {
718718
}
719719

720720
generateMonthlyReport = () => {
721-
const {
722-
monthlyReport,
723-
ui,
724-
reconcileStamp
725-
} = this.props.rewardsData
721+
const { monthlyReport, ui } = this.props.rewardsData
726722

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

731-
const paymentDay = new Intl.DateTimeFormat('default', { day: 'numeric' }).format(reconcileStamp * 1000)
732-
733727
return (
734728
<ModalActivity
735729
onlyAnonWallet={ui.onlyAnonWallet}
@@ -739,7 +733,6 @@ class PageWallet extends React.Component<Props, State> {
739733
months={this.getMonthlyReportDropDown()}
740734
onClose={this.onModalActivityToggle}
741735
onMonthChange={this.onModalActivityAction.bind(this,'onMonthChange')}
742-
paymentDay={parseInt(paymentDay, 10)}
743736
/>
744737
)
745738
}

components/brave_rewards/resources/ui/components/modalActivity/index.tsx

+3-11
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ import {
2121
StyledActionIcon,
2222
Tabs,
2323
Tab,
24-
TabContent,
25-
PaymentMonthly
24+
TabContent
2625
} from './style'
2726
import TableActivity, { DetailRow as ActivityRow } from '../tableActivity'
2827
import TableTransactions, { DetailRow as TransactionRow } from '../tableTransactions'
@@ -59,7 +58,6 @@ export interface Props {
5958
transactionRows: TransactionRow[]
6059
id?: string
6160
summary: SummaryItem[]
62-
paymentDay: number,
6361
onlyAnonWallet?: boolean
6462
}
6563

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

196194
getMonthlyContributionTable = () => {
197-
const { activityRows, paymentDay } = this.props
195+
const { activityRows } = this.props
198196
const rows = activityRows.filter(row => row.type === 'monthly')
199197

200198
return (
@@ -204,15 +202,12 @@ export default class ModalActivity extends React.PureComponent<Props, State> {
204202
>
205203
{getLocale('noActivity')}
206204
</TableActivity>
207-
<PaymentMonthly>
208-
{getLocale('paymentMonthly', { day: paymentDay })}
209-
</PaymentMonthly>
210205
</>
211206
)
212207
}
213208

214209
getAutoContributeTable = () => {
215-
const { activityRows, paymentDay } = this.props
210+
const { activityRows } = this.props
216211
const rows = activityRows.filter(row => row.type === 'contribute')
217212

218213
return (
@@ -222,9 +217,6 @@ export default class ModalActivity extends React.PureComponent<Props, State> {
222217
>
223218
{getLocale('noActivity')}
224219
</TableActivity>
225-
<PaymentMonthly>
226-
{getLocale('paymentMonthly', { day: paymentDay })}
227-
</PaymentMonthly>
228220
</>
229221
)
230222
}

components/brave_rewards/resources/ui/components/modalActivity/style.ts

-11
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,3 @@ export const Tab = styled<TabProps, 'button'>('button')`
116116

117117
export const TabContent = styled<{}, 'div'>('div')`
118118
`
119-
120-
export const PaymentMonthly = styled<{}, 'p'>('p')`
121-
font-size: 14px;
122-
font-weight: 300;
123-
letter-spacing: 0.2px;
124-
color: #4b4c5c;
125-
text-transform: none;
126-
padding: 0px;
127-
margin: -8px 0 24px;
128-
display: block;
129-
`

components/brave_rewards/resources/ui/stories/modal.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ storiesOf('Rewards/Modal', module)
209209
}
210210
}
211211
]}
212-
paymentDay={12}
213212
/>
214213
)
215214
})

components/brave_rewards/resources/ui/stories/settings/pageWallet.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,6 @@ class PageWallet extends React.Component<Props, State> {
335335
}
336336
}
337337
]}
338-
paymentDay={12}
339338
/>
340339
: null
341340
}

components/resources/brave_components_strings.grd

-1
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,6 @@
528528
<message name="IDS_BRAVE_UI_OPEN_BALANCE" desc="">Opening Balance</message>
529529
<message name="IDS_BRAVE_UI_OPEN_ADS_HISTORY" desc="">7-day Ads History</message>
530530
<message name="IDS_BRAVE_UI_PAYMENT" desc="">Payment</message>
531-
<message name="IDS_BRAVE_UI_PAYMENT_MONTHLY" desc="">Payment made every {{day}}th each month.</message>
532531
<message name="IDS_BRAVE_UI_PAYMENT_NOT_MADE" desc="">Payment not made.</message>
533532
<message name="IDS_BRAVE_UI_PAYMENT_PINNED_SITES_HEADER" desc="">Pinned sites are now</message>
534533
<message name="IDS_BRAVE_UI_PAYMENT_PINNED_SITES_MSG" desc="">Here's how monthly contributions work:</message>

0 commit comments

Comments
 (0)