Skip to content

Commit

Permalink
feat: ui changes [SF-1213]
Browse files Browse the repository at this point in the history
  • Loading branch information
leeshuzheng committed Jul 3, 2024
1 parent 33c81be commit 4f01327
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions src/components/organisms/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,11 +265,11 @@ const PointsTag = ({

if (points) {
if (points < 1000) {
pointsDisplay = `${points} points`;
pointsDisplay = `${points} Points`;
} else if (points < 1000000) {
pointsDisplay = `${Math.floor(points / 100) / 10}K points`;
pointsDisplay = `${Math.floor(points / 100) / 10}K Points`;
} else {
pointsDisplay = `${Math.floor(points / 100000) / 10}M points`;
pointsDisplay = `${Math.floor(points / 100000) / 10}M Points`;
}
}

Check warning on line 274 in src/components/organisms/Header/Header.tsx

View check run for this annotation

Codecov / codecov/patch

src/components/organisms/Header/Header.tsx#L267-L274

Added lines #L267 - L274 were not covered by tests

Expand All @@ -286,7 +286,7 @@ const PointsTag = ({
<button
onClick={() => handleOnClick()}
className={clsx(
'typography-mobile-body-5 tablet:typography-desktop-body-4 flex h-8 flex-shrink-0 items-center justify-center gap-1 rounded-lg border border-tertiary-500 bg-tertiary-700/30 px-2.5 py-[5px] font-semibold text-neutral-50 hover:bg-tertiary-700 active:border-transparent tablet:h-10 tablet:rounded-xl',
'typography-mobile-body-5 tablet:typography-desktop-body-4 flex h-8 flex-shrink-0 items-center justify-center gap-1 rounded-lg bg-tertiary-700/30 px-2.5 py-[5px] font-semibold text-neutral-50 ring-1 ring-tertiary-500 hover:bg-tertiary-700 active:border-transparent tablet:h-10 tablet:rounded-xl tablet:ring-[1.5px]',
{
'w-8 tablet:w-10 tablet:pr-2.5': !showPoints,
'tablet:pr-3': showPoints,
Expand Down
10 changes: 5 additions & 5 deletions src/components/organisms/Header/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ export const PRODUCTION_LINKS = [
link: '/portfolio',
dataCy: 'history',
},
{
text: 'Bridge',
link: '/bridge',
dataCy: 'bridge',
},
{
text: 'Points',
link: '/points',
Expand All @@ -19,11 +24,6 @@ export const PRODUCTION_LINKS = [
link: '/campaign',
dataCy: 'campaign',
},
{
text: 'Bridge',
link: '/bridge',
dataCy: 'bridge',
},
];

export const DEV_LINKS = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('PointsDashboard Component', () => {
screen.getByText('Join the Secured Finance Points Program!')
).toBeInTheDocument();
expect(
screen.getByRole('button', { name: 'Join' })
screen.queryAllByRole('button', { name: 'Connect Wallet' })[1]
).toBeInTheDocument();
});
});
2 changes: 1 addition & 1 deletion src/components/pages/PointsDashboard/PointsDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ const UserPointInfo = ({ chainId }: { chainId: number }) => {
}}
disabled={!isConnected || isLoading || loading}
>
Join
{!isConnected ? 'Connect Wallet' : 'Join'}
</Button>
</>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/links.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const LinkList: ExternalLink[] = [
},
{
text: 'Join us on Discord',
href: 'https://discord.com/invite/FqrdfQgmjT',
href: 'https://discord.gg/3kytCrv3qY',
icon: <Discord className='h-5 w-5 text-white' />,
},
];
Expand Down

0 comments on commit 4f01327

Please sign in to comment.