diff options
author | Fred Carlsen <fred@sjelfull.no> | 2018-12-15 06:03:45 +0800 |
---|---|---|
committer | Fred Carlsen <fred@sjelfull.no> | 2018-12-15 06:03:45 +0800 |
commit | b9fa158092c0179d41f5cf7b4f62eec95dd7f4f6 (patch) | |
tree | fd31ed0b062a50dc4fc775b99b344e283dcd9f86 /packages/website/ts | |
parent | 8570616d9765584e91c2fcfced398a6289536464 (diff) | |
download | dexon-sol-tools-b9fa158092c0179d41f5cf7b4f62eec95dd7f4f6.tar dexon-sol-tools-b9fa158092c0179d41f5cf7b4f62eec95dd7f4f6.tar.gz dexon-sol-tools-b9fa158092c0179d41f5cf7b4f62eec95dd7f4f6.tar.bz2 dexon-sol-tools-b9fa158092c0179d41f5cf7b4f62eec95dd7f4f6.tar.lz dexon-sol-tools-b9fa158092c0179d41f5cf7b4f62eec95dd7f4f6.tar.xz dexon-sol-tools-b9fa158092c0179d41f5cf7b4f62eec95dd7f4f6.tar.zst dexon-sol-tools-b9fa158092c0179d41f5cf7b4f62eec95dd7f4f6.zip |
Update links and routes
Diffstat (limited to 'packages/website/ts')
9 files changed, 36 insertions, 30 deletions
diff --git a/packages/website/ts/@next/components/aboutPageLayout.tsx b/packages/website/ts/@next/components/aboutPageLayout.tsx index 97e709471..7d98804bb 100644 --- a/packages/website/ts/@next/components/aboutPageLayout.tsx +++ b/packages/website/ts/@next/components/aboutPageLayout.tsx @@ -8,6 +8,7 @@ import { SiteWrap } from 'ts/@next/components/siteWrap'; import { Heading, Paragraph } from 'ts/@next/components/text'; import { addFadeInAnimation } from 'ts/@next/constants/animations'; +import { WebsitePaths } from 'ts/types'; interface Props { title: string; @@ -21,10 +22,10 @@ export const AboutPageLayout = (props: Props) => ( <SiteWrap theme="light"> <Section isFlex={true} maxWidth="1170px" wrapWidth="100%"> <Column> - <ChapterLink to="/next/about/mission">Mission</ChapterLink> - <ChapterLink to="/next/about/team">Team</ChapterLink> - <ChapterLink to="/next/about/press">Press</ChapterLink> - <ChapterLink to="/next/about/jobs">Jobs</ChapterLink> + <ChapterLink to={WebsitePaths.AboutMission}>Mission</ChapterLink> + <ChapterLink to={WebsitePaths.AboutTeam}>Team</ChapterLink> + <ChapterLink to={WebsitePaths.AboutPress}>Press</ChapterLink> + <ChapterLink to={WebsitePaths.AboutJobs}>Jobs</ChapterLink> </Column> <Column width="70%" maxWidth="800px"> diff --git a/packages/website/ts/@next/components/dropdowns/dropdown_products.tsx b/packages/website/ts/@next/components/dropdowns/dropdown_products.tsx index 4bf82efb8..1677d3c08 100644 --- a/packages/website/ts/@next/components/dropdowns/dropdown_products.tsx +++ b/packages/website/ts/@next/components/dropdowns/dropdown_products.tsx @@ -4,22 +4,19 @@ import * as React from 'react'; import {Link} from 'react-router-dom'; import styled from 'styled-components'; import {Heading, Paragraph} from 'ts/@next/components/text'; +import { WebsitePaths } from 'ts/types'; const navData = [ { title: '0x Instant', description: 'Simple crypto purchasing', - url: '/next/0x-instant', + url: WebsitePaths.Instant, }, { title: '0x Launch kit', description: 'Build on the 0x protocol', - url: '#', + url: WebsitePaths.LaunchKit, }, - // { - // title: 'Extensions', - // url: '#', - // }, ]; export const DropdownProducts: React.FunctionComponent<{}> = () => ( diff --git a/packages/website/ts/@next/components/footer.tsx b/packages/website/ts/@next/components/footer.tsx index bc441499d..5e5106ff3 100644 --- a/packages/website/ts/@next/components/footer.tsx +++ b/packages/website/ts/@next/components/footer.tsx @@ -7,6 +7,7 @@ import styled from 'styled-components'; import { Logo } from 'ts/@next/components/logo'; import { Column, FlexWrap, WrapGrid } from 'ts/@next/components/newLayout'; import { NewsletterForm } from 'ts/@next/components/newsletter_form'; +import { WebsitePaths } from 'ts/types'; interface LinkInterface { text: string; @@ -29,8 +30,8 @@ const linkRows: LinkRows[] = [ heading: 'Products', isOnMobile: true, links: [ - { url: '/next/instant', text: '0x Instant' }, - { url: '#', text: '0x Launch Kit' }, + { url: WebsitePaths.Instant, text: '0x Instant' }, + { url: WebsitePaths.LaunchKit, text: '0x Launch Kit' }, ], }, { @@ -45,11 +46,11 @@ const linkRows: LinkRows[] = [ heading: 'About', isOnMobile: true, links: [ - { url: '#', text: 'Mission' }, - { url: '#', text: 'Team' }, - { url: '#', text: 'Jobs' }, - { url: '#', text: 'Press Kit' }, - { url: '/next/ecosystem-program', text: 'Grant Program' }, + { url: WebsitePaths.AboutMission, text: 'Mission' }, + { url: WebsitePaths.AboutTeam, text: 'Team' }, + { url: WebsitePaths.AboutJobs, text: 'Jobs' }, + { url: WebsitePaths.AboutPress, text: 'Press Kit' }, + { url: WebsitePaths.Ecosystem, text: 'Grant Program' }, ], }, { diff --git a/packages/website/ts/@next/components/header.tsx b/packages/website/ts/@next/components/header.tsx index b31d34765..c5615e61f 100644 --- a/packages/website/ts/@next/components/header.tsx +++ b/packages/website/ts/@next/components/header.tsx @@ -12,6 +12,7 @@ import { Logo } from 'ts/@next/components/logo'; import { MobileNav } from 'ts/@next/components/mobileNav'; import { FlexWrap } from 'ts/@next/components/newLayout'; import { ThemeValuesInterface } from 'ts/@next/components/siteWrap'; +import { WebsitePaths } from 'ts/types'; interface HeaderProps { location?: Location; @@ -35,12 +36,12 @@ interface DropdownWrapInterface { const navItems: NavItemProps[] = [ { id: 'why', - url: '/next/why', + url: WebsitePaths.Why, text: 'Why 0x', }, { id: 'products', - url: '/next/instant', + url: '#', text: 'Products', dropdownComponent: DropdownProducts, dropdownWidth: 280, @@ -54,7 +55,7 @@ const navItems: NavItemProps[] = [ }, { id: 'about', - url: '/next/about/mission', + url: WebsitePaths.AboutMission, text: 'About', }, { diff --git a/packages/website/ts/@next/components/mobileNav.tsx b/packages/website/ts/@next/components/mobileNav.tsx index 2b8c10ea6..35b4353e1 100644 --- a/packages/website/ts/@next/components/mobileNav.tsx +++ b/packages/website/ts/@next/components/mobileNav.tsx @@ -5,6 +5,7 @@ import styled from 'styled-components'; import {Link} from 'react-router-dom'; import {WrapGrid, WrapProps} from 'ts/@next/components/newLayout'; +import { WebsitePaths } from 'ts/types'; interface Props { isToggled: boolean; @@ -38,21 +39,16 @@ export class MobileNav extends React.PureComponent<Props> { <Section isDark={true}> <Grid as="ul" isFullWidth={true} isWrapped={true}> <li> - <Link to="/next/why"> + <Link to={WebsitePaths.Why}> Why 0x </Link> </li> <li> - <Link to="/next/about/mission"> + <Link to={WebsitePaths.AboutMission}> About </Link> </li> <li> - <Link to="/next"> - Products - </Link> - </li> - <li> <Link to="https://blog.0xproject.com/latest"> Blog </Link> diff --git a/packages/website/ts/@next/components/sections/landing/hero.tsx b/packages/website/ts/@next/components/sections/landing/hero.tsx index 2460586d5..6bd34c46d 100644 --- a/packages/website/ts/@next/components/sections/landing/hero.tsx +++ b/packages/website/ts/@next/components/sections/landing/hero.tsx @@ -5,6 +5,7 @@ import {Hero} from 'ts/@next/components/hero'; import {LandingAnimation} from 'ts/@next/components/heroImage'; import {HeroAnimation} from 'ts/@next/components/heroAnimation'; +import { WebsitePaths } from 'ts/types'; export const SectionLandingHero = () => ( <Hero @@ -23,7 +24,7 @@ const HeroActions = () => ( Get Started </Button> - <Button to="/next/why" isTransparent={true} isInline={true}> + <Button to={WebsitePaths.Why} isTransparent={true} isInline={true}> Learn More </Button> </> diff --git a/packages/website/ts/@next/pages/about/team.tsx b/packages/website/ts/@next/pages/about/team.tsx index 14af70783..bf8d02095 100644 --- a/packages/website/ts/@next/pages/about/team.tsx +++ b/packages/website/ts/@next/pages/about/team.tsx @@ -7,6 +7,7 @@ import { colors } from 'ts/style/colors'; import { AboutPageLayout } from 'ts/@next/components/aboutPageLayout'; import { Column, Section } from 'ts/@next/components/newLayout'; import { Heading, Paragraph } from 'ts/@next/components/text'; +import { WebsitePaths } from 'ts/types'; interface TeamMember { name: string; @@ -180,7 +181,7 @@ export const NextAboutTeam = () => ( title="We are a global, growing team" description="We are a distributed team with backgrounds in engineering, academic research, business, and design. The 0x Core Team is passionate about accelerating the adoption decentralized technology and believe in its potential to be an equalizing force in the world. Join us and do the most impactful work of your life." linkLabel="Join the team" - linkUrl="/next/about/jobs" + linkUrl={WebsitePaths.AboutJobs} > <Section maxWidth="1170px" diff --git a/packages/website/ts/@next/pages/launch_kit.tsx b/packages/website/ts/@next/pages/launch_kit.tsx index 43b538df4..30fedba1b 100644 --- a/packages/website/ts/@next/pages/launch_kit.tsx +++ b/packages/website/ts/@next/pages/launch_kit.tsx @@ -12,6 +12,8 @@ import { SiteWrap } from 'ts/@next/components/siteWrap'; import {Section} from 'ts/@next/components/newLayout'; import { ModalContact } from '../components/modals/modal_contact'; +import { WebsitePaths } from 'ts/types'; + const offersData = [ { icon: 'supportForAllEthereumStandards', @@ -120,7 +122,7 @@ const HeroActions = () => ( Get Started </Button> - <Button to="/next/why" isTransparent={true} isInline={true}> + <Button to={WebsitePaths.Why} isTransparent={true} isInline={true}> Learn More </Button> </> diff --git a/packages/website/ts/types.ts b/packages/website/ts/types.ts index b20dd7095..a668681d5 100644 --- a/packages/website/ts/types.ts +++ b/packages/website/ts/types.ts @@ -352,8 +352,14 @@ export enum WebsitePaths { Home = '/', FAQ = '/faq', About = '/about', + AboutMission = '/about/mission', + AboutTeam = '/about/team', + AboutPress = '/about/press', + AboutJobs = '/about/jobs', LaunchKit = '/launch-kit', Instant = '/instant', + Ecosystem = '/ecosystem', + Why = '/why', Whitepaper = '/pdfs/0x_white_paper.pdf', SmartContracts = '/docs/contracts', Connect = '/docs/connect', |