Skip to content

Commit b2eba3d

Browse files
committed
Revert replacing portfolio button
1 parent a97309e commit b2eba3d

File tree

4 files changed

+17
-23
lines changed

4 files changed

+17
-23
lines changed

ui/components/app/rewards/RewardsPointsBalance.test.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,20 +108,15 @@ describe('RewardsPointsBalance', () => {
108108
expect(container.firstChild).toBeNull();
109109
});
110110

111-
it('should render opt-in badge when candidateSubscriptionId is null', () => {
111+
it('should render null when candidateSubscriptionId is null', () => {
112112
mockUseRewardsContext.mockReturnValue({
113113
...mockRewardsContextValue,
114114
seasonStatus: null,
115115
candidateSubscriptionId: null,
116116
});
117117

118-
render(<RewardsPointsBalance />);
119-
120-
expect(screen.getByTestId('rewards-points-balance')).toBeInTheDocument();
121-
expect(
122-
screen.getByTestId('rewards-points-balance-value'),
123-
).toHaveTextContent('Opt In');
124-
expect(screen.getByAltText('Rewards Points Icon')).toBeInTheDocument();
118+
const { container } = render(<RewardsPointsBalance />);
119+
expect(container.firstChild).toBeNull();
125120
});
126121

127122
it('should render skeleton when loading and no balance exists', () => {

ui/components/app/rewards/RewardsPointsBalance.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export const RewardsPointsBalance = () => {
5050
}
5151

5252
if (!candidateSubscriptionId) {
53-
return <RewardsBadge text={t('rewardsOptIn')} />;
53+
return null;
5454
}
5555

5656
if (seasonStatusLoading && !seasonStatus?.balance) {

ui/components/app/wallet-overview/coin-overview.tsx

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -249,20 +249,19 @@ export const CoinOverview = ({
249249

250250
const renderPercentageAndAmountChange = () => {
251251
const renderPortfolioButton = () => {
252-
if (isRewardsEnabled) {
253-
return <RewardsPointsBalance />;
254-
}
255-
256252
return (
257-
<ButtonLink
258-
endIconName={IconName.Export}
259-
onClick={handlePortfolioOnClick}
260-
as="a"
261-
data-testid="portfolio-link"
262-
textProps={{ variant: TextVariant.bodyMdMedium }}
263-
>
264-
{t('discover')}
265-
</ButtonLink>
253+
<>
254+
{isRewardsEnabled && <RewardsPointsBalance />}
255+
<ButtonLink
256+
endIconName={IconName.Export}
257+
onClick={handlePortfolioOnClick}
258+
as="a"
259+
data-testid="portfolio-link"
260+
textProps={{ variant: TextVariant.bodyMdMedium }}
261+
>
262+
{t('discover')}
263+
</ButtonLink>
264+
</>
266265
);
267266
};
268267

ui/components/app/wallet-overview/index.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
display: flex;
4040
flex-direction: row;
4141
gap: 8px;
42+
flex-wrap: wrap;
4243
}
4344
}
4445

@@ -72,7 +73,6 @@
7273
min-width: 0;
7374
position: relative;
7475
align-items: start;
75-
max-width: 326px;
7676
}
7777

7878
&__primary-container {

0 commit comments

Comments
 (0)