import * as _ from 'lodash';
import * as React from 'react';
import AnchorLink from 'react-anchor-link-smooth-scroll';
import styled from 'styled-components';
import {Hero} from 'ts/@next/components/hero';
import { Banner } from 'ts/@next/components/banner';
import { Button } from 'ts/@next/components/button';
import {Definition} from 'ts/@next/components/definition';
import {Column, Section, WrapSticky} from 'ts/@next/components/newLayout';
import { SiteWrap } from 'ts/@next/components/siteWrap';
import { Slide, Slider } from 'ts/@next/components/slider/slider';
import { ModalContact } from '../components/modals/modal_contact';
import { Heading } from 'ts/@next/components/text';
const offersData = [
{
icon: 'robustSmartContracts',
title: 'Robust Smart Contracts',
description: `0x Protocol's smart contracts have been put through two rounds of rigorous security audits.`,
},
{
icon: 'extensibleArchitecture',
title: 'Extensible Architecture',
description: `0x's modular pipeline enables you to plug in your own smart contracts through an extensible API.`,
},
{
icon: 'eficientDesign',
title: 'Efficient Design',
description: `0x’s off-chain order relay with on-chain settlement is a gas efficient approach to p2p exchange, reducing blockchain bloat.`,
},
];
const functionalityData = [
{
icon: 'secureTrading',
title: 'Secure Non-custodial Trading',
description: 'Enable tokens to be traded wallet-to-wallet with no deposits or withdrawals.',
},
{
icon: 'flexibleOrders',
title: 'Flexible Order Types',
description: 'Choose to sell assets at a specific “buy it now” price or allow potential buyers to submit bids.',
},
{
icon: 'buildBusiness',
title: 'Build a Business',
description: 'Monetize your product by taking fees on each transaction and join a growing number of relayers in the 0x ecosystem.',
},
];
const useCaseSlides = [
{
icon: 'gamingAndCollectibles',
title: 'Games & Collectibles',
description: 'Artists and game makers are tokenizing digital art and in-game items known as non-fungible tokens (NFTs). 0x enables these creators to add exchange functionality by providing the ability to build marketplaces for NFT trading.',
},
{
icon: 'predictionMarkets',
title: 'Prediction Markets',
description: 'Decentralized prediction markets and cryptodervivative platforms generate sets of tokens that represent a financial stake in the outcomes of events. 0x allows these tokens to be instantly tradable in liquid markets.',
},
{
icon: 'orderBooks',
title: 'Order Books',
description: 'There are thousands of decentralized apps and protocols that have native utility tokens. 0x provides professional exchanges with the ability to host order books and facilitates the exchange of these assets.',
},
{
icon: 'decentralisedLoans',
title: 'Decentralized Loans',
description: 'Efficient lending requires liquid markets where investors can buy and re-sell loans. 0x enables an ecosystem of lenders to self-organize and efficiently determine market prices for all outstanding loans.',
},
{
icon: 'stableTokens',
title: 'Stable Tokens',
description: 'Novel economic constructs such as stable coins require efficient, liquid markets to succeed. 0x will facilitate the underlying economic mechanisms that allow these tokens to remain stable.',
},
];
export class NextWhy extends React.Component {
public state = {
isContactModalOpen: false,
};
public render(): React.ReactNode {
return (
Build on 0x
}
/>
Benefits
Use Cases
Features
What 0x offers
{_.map(offersData, (item, index) => (
))}
Use Cases
{_.map(useCaseSlides, (item, index) => (
))}
Exchange Functionality
{_.map(functionalityData, (item, index) => (
))}
);
}
public _onOpenContactModal = (): void => {
this.setState({ isContactModalOpen: true });
}
public _onDismissContactModal = (): void => {
this.setState({ isContactModalOpen: false });
}
}
interface SectionProps {
isNotRelative?: boolean;
}
const SectionWrap = styled.div`
position: ${props => !props.isNotRelative && 'relative'};
& + & {
padding-top: 60px;
margin-top: 60px;
}
@media (min-width: 768px) {
& + &:before {
width: 100vw;
}
}
@media (max-width: 768px) {
text-align: left;
& + &:before {
width: 100%;
}
}
`;
const SectionTitle = styled(Heading)<{ isNoBorder?: boolean }>`
position: relative;
${props => !props.isNoBorder && `
&:before {
content: '';
width: 100vw;
position: absolute;
top: -53px;
left: 0;
height: 1px;
background-color: #3d3d3d;
}
`}
@media (max-width: 768px) {
&:before {
width: calc(100vw - 60px);
}
}
`;
const NavStickyWrap = styled(WrapSticky)`
padding-left: 60px;
z-index: 15;
@media (max-width: 768px) {
display: none;
}
`;
const ChapterLink = styled(AnchorLink)`
color: ${props => props.theme.textColor};
font-size: 22px;
margin-bottom: 25px;
display: block;
opacity: 0.8;
&:hover,
&:active {
opacity: 1;
}
`;