Skip to content

Commit

Permalink
Remove blogs and align the cursor style if no details; Update the app…
Browse files Browse the repository at this point in the history
… version
  • Loading branch information
LeifuChen committed Jul 15, 2023
1 parent 12532f4 commit 3a86db3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kwenta/app",
"version": "7.4.0",
"version": "7.4.3",
"scripts": {
"dev": "next",
"build": "next build",
Expand Down
3 changes: 1 addition & 2 deletions packages/app/src/constants/announcement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import { MILLISECONDS_PER_DAY } from '@kwenta/sdk/constants'
export const BANNER_ENABLED = true
// Sets the link destination for the banner component, or renders the banner as
// plain, un-clickable text if set to a falsey value (`false`, `null`, '', etc...)
export const BANNER_LINK_URL =
'https://mirror.xyz/kwenta.eth/Z7hEjkIUDwSXI1VcpG6Z90cAufXWeoC6Gg-TWcIr6jQ'
export const BANNER_LINK_URL = ''
// Sets the text displayed on the home page banner
export const BANNER_TEXT = 'The staking contracts are currently paused.'
// Sets the height of the banner component on desktop
Expand Down
10 changes: 5 additions & 5 deletions packages/app/src/sections/shared/Layout/HomeLayout/Banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import localStore from 'utils/localStore'
type BannerViewProps = {
mode: 'mobile' | 'desktop'
onDismiss: (e: any) => void
onDetails: () => void
onDetails?: () => void
}

const BannerView: React.FC<BannerViewProps> = ({ mode, onDismiss, onDetails }) => {
Expand All @@ -33,7 +33,7 @@ const BannerView: React.FC<BannerViewProps> = ({ mode, onDismiss, onDetails }) =
const linkSize = isMobile ? 'small' : 'medium'

return (
<FuturesBannerContainer onClick={onDetails}>
<FuturesBannerContainer onClick={onDetails} hasDetails={!!BANNER_LINK_URL}>
<FuturesBannerLinkWrapper>
<FuturesLink size={linkSize}>
<strong>Important: </strong>
Expand Down Expand Up @@ -77,7 +77,7 @@ const Banner = memo(() => {
)

const openDetails = useCallback(
() => window.open(BANNER_LINK_URL, '_blank', 'noopener noreferrer'),
() => BANNER_LINK_URL && window.open(BANNER_LINK_URL, '_blank', 'noopener noreferrer'),
[]
)

Expand Down Expand Up @@ -107,14 +107,14 @@ const FuturesLink = styled(Body)`
`};
`

const FuturesBannerContainer = styled.div<{ $compact?: boolean }>`
const FuturesBannerContainer = styled.div<{ $compact?: boolean; hasDetails?: boolean }>`
height: ${BANNER_HEIGHT_DESKTOP}px;
width: 100%;
display: flex;
align-items: center;
background: ${(props) => props.theme.colors.selectedTheme.newTheme.banner.yellow.background};
margin-bottom: 0;
cursor: pointer;
cursor: ${(props) => (props.hasDetails ? 'pointer' : 'auto')};
${media.lessThan('md')`
position: relative;
Expand Down

0 comments on commit 3a86db3

Please sign in to comment.