Skip to content

Commit d6d85f0

Browse files
committed
A4A > Referrals: Manual referrals cleanup
1 parent 3b0ed30 commit d6d85f0

File tree

22 files changed

+171
-586
lines changed

22 files changed

+171
-586
lines changed

client/a8c-for-agencies/components/a4a-migration-offer/index.tsx

-96
This file was deleted.

client/a8c-for-agencies/components/a4a-migration-offer/style.scss

-93
This file was deleted.

client/a8c-for-agencies/components/sidebar-menu/lib/constants.ts

-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ export const A4A_MARKETPLACE_CHECKOUT_LINK = `${ A4A_MARKETPLACE_LINK }/checkout
2121
export const A4A_MARKETPLACE_ASSIGN_LICENSE_LINK = `${ A4A_MARKETPLACE_LINK }/assign-license`;
2222
export const A4A_PURCHASES_LINK = '/purchases';
2323
export const A4A_REFERRALS_LINK = '/referrals';
24-
export const A4A_REFERRALS_BANK_DETAILS_LINK = '/referrals/bank-details';
25-
export const A4A_REFERRALS_COMMISSIONS_LINK = '/referrals/commissions';
2624
export const A4A_REFERRALS_DASHBOARD = `${ A4A_REFERRALS_LINK }/dashboard`;
2725
export const A4A_REFERRALS_PAYMENT_SETTINGS = `${ A4A_REFERRALS_LINK }/payment-settings`;
2826
export const A4A_REFERRALS_FAQ = `${ A4A_REFERRALS_LINK }/faq`;

client/a8c-for-agencies/components/step-section-item/index.tsx

+9-15
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ interface StepSectionItemProps {
1818
statusProps?: React.ComponentProps< typeof Badge > & { tooltip?: string };
1919
className?: string;
2020
iconClassName?: string;
21-
isNewLayout?: boolean;
2221
stepNumber?: number;
2322
}
2423

@@ -30,21 +29,10 @@ export default function StepSectionItem( {
3029
statusProps,
3130
className,
3231
iconClassName,
33-
isNewLayout = false,
3432
stepNumber,
3533
}: StepSectionItemProps ) {
3634
const status = <StatusBadge statusProps={ statusProps } />;
3735

38-
const buttonContent = buttonProps && (
39-
<div className="step-section-item__button">
40-
<Button { ...buttonProps } />
41-
</div>
42-
);
43-
44-
const statusContent = statusProps && (
45-
<div className="step-section-item__status is-large-screen">{ status }</div>
46-
);
47-
4836
return (
4937
<div className={ clsx( 'step-section-item', className ) }>
5038
{ icon && (
@@ -58,12 +46,18 @@ export default function StepSectionItem( {
5846
<div className="step-section-item__status is-small-screen">{ status }</div>
5947
) }
6048
<div className="step-section-item__heading">
61-
{ heading } { isNewLayout && statusContent }
49+
{ heading }
50+
{ statusProps && (
51+
<div className="step-section-item__status is-large-screen">{ status }</div>
52+
) }
6253
</div>
6354
<div className="step-section-item__description">{ preventWidows( description ) }</div>
64-
{ ! isNewLayout && buttonContent }
6555
</div>
66-
{ isNewLayout ? buttonContent : statusContent }
56+
{ buttonProps && (
57+
<div className="step-section-item__button">
58+
<Button { ...buttonProps } />
59+
</div>
60+
) }
6761
</div>
6862
);
6963
}

client/a8c-for-agencies/components/step-section-item/style.scss

+1-21
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@import "@wordpress/base-styles/breakpoints";
22
@import "@wordpress/base-styles/mixins";
33
@import "@wordpress/base-styles/variables";
4+
45
.step-section-item {
56
margin-block-end: 16px;
67
border-radius: 4px;
@@ -110,27 +111,6 @@
110111
}
111112
}
112113

113-
.referrals-layout--automated .step-section-item {
114-
.step-section-item__button .button {
115-
min-width: 120px;
116-
}
117-
118-
.step-section-item__button {
119-
@include break-large {
120-
margin-block: auto;
121-
}
122-
}
123-
124-
.step-section-item__status.is-large-screen {
125-
@include break-large {
126-
display: inline-flex;
127-
position: relative;
128-
left: 4px;
129-
}
130-
131-
}
132-
}
133-
134114
.step-section-item__step-number {
135115
display: none;
136116
color: var(--color-accent);

client/a8c-for-agencies/components/step-section/style.scss

-8
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,3 @@
3131
}
3232
}
3333
}
34-
35-
.referrals-layout--automated,
36-
.commission-overview__layout-automated {
37-
.step-section .step-section__header .step-section__step-heading {
38-
font-size: rem(16px);
39-
}
40-
}
41-
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
export const A4A_DOWNLOAD_LINK_ON_GITHUB =
2-
'https://github.com/Automattic/automattic-for-agencies-client/releases/download/v0.1.0/automattic-for-agencies-client.zip';
3-
41
export const REFERRAL_EMAIL_QUERY_PARAM_KEY = 'referral_email';
52

63
export const AGENCY_FIRST_PURCHASE_SESSION_STORAGE_KEY = 'a4a_first_purchase';

client/a8c-for-agencies/lib/permission.ts

-4
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ import {
2424
A4A_MARKETPLACE_ASSIGN_LICENSE_LINK,
2525
A4A_MARKETPLACE_DOWNLOAD_PRODUCTS_LINK,
2626
A4A_REFERRALS_LINK,
27-
A4A_REFERRALS_BANK_DETAILS_LINK,
28-
A4A_REFERRALS_COMMISSIONS_LINK,
2927
A4A_REFERRALS_DASHBOARD,
3028
A4A_REFERRALS_PAYMENT_SETTINGS,
3129
A4A_REFERRALS_FAQ,
@@ -73,8 +71,6 @@ const MEMBER_ACCESSIBLE_PATHS: Record< string, string[] > = {
7371
[ A4A_MARKETPLACE_ASSIGN_LICENSE_LINK ]: [ 'a4a_read_marketplace' ],
7472
[ A4A_MARKETPLACE_DOWNLOAD_PRODUCTS_LINK ]: [ 'a4a_read_marketplace' ],
7573
[ A4A_REFERRALS_LINK ]: [ 'a4a_read_referrals' ],
76-
[ A4A_REFERRALS_BANK_DETAILS_LINK ]: [ 'a4a_read_referrals' ],
77-
[ A4A_REFERRALS_COMMISSIONS_LINK ]: [ 'a4a_read_referrals' ],
7874
[ A4A_REFERRALS_DASHBOARD ]: [ 'a4a_read_referrals' ],
7975
[ A4A_REFERRALS_PAYMENT_SETTINGS ]: [ 'a4a_read_referrals' ],
8076
[ A4A_REFERRALS_FAQ ]: [ 'a4a_read_referrals' ],

client/a8c-for-agencies/sections/migrations/primary/migrations-commissions/empty-state.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ export default function MigrationsCommissionsEmptyState( {
2727
return (
2828
<StepSection heading={ translate( 'View your migrated websites and commisions right here.' ) }>
2929
<StepSectionItem
30-
isNewLayout
3130
heading={ translate( "We'll tag the sites we moved for you once they're transferred." ) }
3231
description={ preventWidows(
3332
translate(
@@ -36,7 +35,6 @@ export default function MigrationsCommissionsEmptyState( {
3635
) }
3736
/>
3837
<StepSectionItem
39-
isNewLayout
4038
heading={ translate( 'Tag your transferred sites so we can pay you for them.' ) }
4139
description={
4240
<>

client/a8c-for-agencies/sections/partner-directory/dashboard/index.tsx

-4
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,6 @@ const PartnerDirectoryDashboard = () => {
291291
return (
292292
<StepSectionItem
293293
key={ application.brand }
294-
isNewLayout
295294
iconClassName={ clsx( brandMeta.className ) }
296295
icon={ brandMeta.icon }
297296
heading={ application.brand }
@@ -343,7 +342,6 @@ const PartnerDirectoryDashboard = () => {
343342
</div>
344343
<StepSection heading={ translate( 'How do I start?' ) }>
345344
<StepSectionItem
346-
isNewLayout
347345
className={
348346
currentApplicationStep > 0 ? 'partner-directory-dashboard__checked-step' : ''
349347
}
@@ -388,7 +386,6 @@ const PartnerDirectoryDashboard = () => {
388386
} }
389387
/>
390388
<StepSectionItem
391-
isNewLayout
392389
className={
393390
currentApplicationStep > 1 ? 'partner-directory-dashboard__checked-step' : ''
394391
}
@@ -408,7 +405,6 @@ const PartnerDirectoryDashboard = () => {
408405
} }
409406
/>
410407
<StepSectionItem
411-
isNewLayout
412408
stepNumber={ currentApplicationStep > 2 ? undefined : 3 }
413409
icon={ currentApplicationStep > 2 ? check : undefined }
414410
heading={ translate( 'New clients will find you' ) }

client/a8c-for-agencies/sections/referrals/common/missing-payment-settings-notice/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const MissingPaymentSettingsNotice = () => {
1212
const { data: tipaltiData } = useGetTipaltiPayee();
1313
const isPayable = tipaltiData?.IsPayable;
1414

15-
const { data: referrals } = useFetchReferrals( true );
15+
const { data: referrals } = useFetchReferrals();
1616

1717
const hasReferrals = !! referrals?.length;
1818

0 commit comments

Comments
 (0)