Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(twap): hide learn more link #2815

Merged
merged 3 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ export const TWAP_BULLET_LIST_CONTENT: BulletListItem[] = [
]

const UNLOCK_SCREEN = {
title: 'Unlock the Power of Advanced Orders:',
title: 'Unlock the Power of Advanced Orders',
subtitle: 'Begin with TWAP Today!',
orderType: 'TWAP',
buttonText: 'Unlock TWAP orders (BETA)',
// TODO: add actual link before deploy to PROD
buttonLink: 'http://google.com',
buttonLink: '',
}

export function AdvancedOrdersWidget({ children }: { children: JSX.Element }) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ export const LIMIT_BULLET_LIST_CONTENT: BulletListItem[] = [
NOW with&nbsp;<b>partial fills</b>&nbsp;support!
</span>
),
isNew: true,
},
]

Expand Down
10 changes: 6 additions & 4 deletions src/modules/trade/pure/UnlockWidgetScreen/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type UnlockWidgetProps = {
handleUnlock: () => void
title: string
subtitle: string
buttonLink: string
buttonLink?: string
orderType: string
buttonText: string
}
Expand Down Expand Up @@ -51,9 +51,11 @@ export function UnlockWidgetScreen({
)}

<styledEl.ControlSection>
<span>
Learn more about <ExternalLink href={buttonLink}>{orderType} orders ↗</ExternalLink>
</span>
{buttonLink && (
<span>
Learn more about <ExternalLink href={buttonLink}>{orderType} orders ↗</ExternalLink>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not making buttonLink optional param instead?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this way, we just need to not specify the URL until is available

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion, will update.

</span>
)}
<ButtonPrimary id={`unlock-${orderType}-orders-btn`} onClick={handleUnlock}>
{buttonText}
</ButtonPrimary>
Expand Down
4 changes: 2 additions & 2 deletions src/modules/trade/pure/UnlockWidgetScreen/styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ export const TitleSection = styled.div`
margin: 24px auto 42px;

> h3 {
font-weight: 500;
font-weight: 400;
font-size: inherit;
margin: 0 0 4px;
color: ${({ theme }) => transparentize(0.2, theme.text1)};
}

> strong {
font-weight: 800;
font-size: 22px;
color: ${({ theme }) => transparentize(0.3, theme.text1)};
margin: 0;
}
`
Expand Down
Loading