diff --git a/apps/landing/components/common/EarnCard.tsx b/apps/landing/components/common/EarnCard.tsx index 42376e04..c166081b 100644 --- a/apps/landing/components/common/EarnCard.tsx +++ b/apps/landing/components/common/EarnCard.tsx @@ -1,12 +1,20 @@ import {type ReactElement, useState} from 'react'; import Image from 'next/image'; +import Link from 'next/link'; import {IconArrow} from '@common/icons/IconArrow'; -export function EarnCard(props: {title: string; info: string; logoSrc: string; hoverLogoSrc: string}): ReactElement { +export function EarnCard(props: { + title: string; + info: string; + logoSrc: string; + hoverLogoSrc: string; + href: string; +}): ReactElement { const [isHovering, set_isHovering] = useState(false); return ( -
set_isHovering(true)} onMouseLeave={() => set_isHovering(false)} style={{ @@ -38,6 +46,6 @@ export function EarnCard(props: {title: string; info: string; logoSrc: string; h height={200} alt={'app-logo'} /> -
+ ); } diff --git a/apps/landing/components/common/Header.tsx b/apps/landing/components/common/Header.tsx index 89fed5fd..567020ef 100644 --- a/apps/landing/components/common/Header.tsx +++ b/apps/landing/components/common/Header.tsx @@ -32,7 +32,7 @@ export function LandingAppHeader(): ReactElement { const [isMenuOpen, set_isMenuOpen] = useState(false); const menu = useMemo((): TMenu[] => { - const HOME_MENU = {path: '/', label: 'Home'}; + const HOME_MENU = {path: '/home', label: 'Home'}; return [ HOME_MENU, diff --git a/apps/landing/components/sections/Contribute.tsx b/apps/landing/components/sections/Contribute.tsx index 62f9a540..2be37a67 100644 --- a/apps/landing/components/sections/Contribute.tsx +++ b/apps/landing/components/sections/Contribute.tsx @@ -3,16 +3,38 @@ import Link from 'next/link'; import {IconArrow} from '@common/icons/IconArrow'; const CARDS = [ - {title: 'BUG BOUNTY.', description: 'Bugs?! Ew! Report a bug and you might earn $$.'}, - {title: 'LEAVE FEEDBACK.', description: "Thoughts? Ideas? Improvements? Let's hear it!"}, - {title: 'WRITE DOCS.', description: 'Want to help write docs for Yearn, be our guest!'}, - {title: 'BUILD.', description: 'Yearn is open source, anyone can contribute to its future!'} + { + title: 'BUG BOUNTY.', + description: 'Bugs?! Ew! Report a bug and you might earn $$.', + href: 'https://immunefi.com/bug-bounty/yearnfinance/information/', + target: '_blank' + }, + { + title: 'LEAVE FEEDBACK.', + description: "Thoughts? Ideas? Improvements? Let's hear it!", + href: 'https://gov.yearn.fi/c/general-chat/feedback/2', + target: '_blank' + }, + { + title: 'WRITE DOCS.', + description: 'Want to help write docs for Yearn, be our guest!', + href: 'https://docs.yearn.fi/', + target: '_blank' + }, + { + title: 'BUILD.', + description: 'Yearn is open source, anyone can contribute to its future!', + href: 'https://github.com/yearn', + target: '_blank' + } ]; -function ContributeCard(props: {title: string; description: string}): ReactElement { +function ContributeCard(props: {title: string; description: string; href: string; target: string}): ReactElement { const [isHovering, set_isHovering] = useState(false); return ( -
set_isHovering(true)} onMouseLeave={() => set_isHovering(false)} style={{ @@ -28,14 +50,10 @@ function ContributeCard(props: {title: string; description: string}): ReactEleme
{props.description}
- - {'Read more'} - +

{'Read more'}

{isHovering && }
- + ); } diff --git a/apps/landing/components/sections/Hero.tsx b/apps/landing/components/sections/Hero.tsx index d1c1e8c5..3a864454 100644 --- a/apps/landing/components/sections/Hero.tsx +++ b/apps/landing/components/sections/Hero.tsx @@ -133,7 +133,9 @@ export function Hero(): ReactElement {

- + + + +
- - - +
@@ -83,6 +90,7 @@ export function WaysToEarn(): ReactElement { 'Yearn Vaults are a core part of DeFi, and you can access them through many popular apps and UIs.' } logoSrc={'/landing/integrations.png'} + href={'/home/integrations'} hoverLogoSrc={'/landing/integrations-hover.png'} /> diff --git a/pages/_app.tsx b/pages/_app.tsx index 4a6a1f0e..191bed84 100755 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -27,6 +27,7 @@ import type {ReactElement} from 'react'; import type {Chain} from 'viem'; import '../style.css'; +import {usePathname} from 'next/navigation'; /** 🔵 - Yearn Finance *************************************************************************** ** The 'WithLayout' function is a React functional component that returns a ReactElement. It is used @@ -49,9 +50,10 @@ const WithLayout = memo(function WithLayout( const {name} = useCurrentApp(props.router); const [isSearchOpen, set_isSearchOpen] = useState(false); const [isNavbarOpen, set_isNavbarOpen] = useState(false); - const isOnLanding = props.router.asPath?.startsWith('/home/') || props.router.asPath === '/'; + const isHomepage = props.router.asPath?.startsWith('/home'); + const pathName = usePathname(); - if (isOnLanding) { + if (isHomepage) { return (
- {pathName === '/landing' ? ( - - ) : ( - - )} + {pathName === '/' ? : }
; + return ( +
+
+ + + + + +
+
+
+
+
+
+
+
+ ); } export default Index; diff --git a/pages/landing.tsx b/pages/landing.tsx deleted file mode 100644 index 21cf1219..00000000 --- a/pages/landing.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import {About} from 'apps/landing/components/sections/About'; -import {Contribute} from 'apps/landing/components/sections/Contribute'; -import {Footer} from 'apps/landing/components/sections/Footer'; -import {Form} from 'apps/landing/components/sections/Form'; -import {Hero} from 'apps/landing/components/sections/Hero'; -import {Partners} from 'apps/landing/components/sections/Partners'; -import {WaysToEarn} from 'apps/landing/components/sections/WaysToEarn'; - -import type {ReactElement} from 'react'; - -function Landing(): ReactElement { - return ( -
-
- - - - - -
- -
-
-
- ); -} - -export default Landing;