Changeset View
Changeset View
Standalone View
Standalone View
web/e.cash/pages/get-ecash.js
// Copyright (c) 2023 The Bitcoin developers | // Copyright (c) 2023 The Bitcoin developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
import Layout from '/components/layout'; | import Layout from '/components/layout'; | ||||
import Image from 'next/image'; | import Image from 'next/image'; | ||||
import SubPageHero from '/components/sub-page-hero'; | import SubPageHero from '/components/sub-page-hero'; | ||||
import H3 from '/components/h3'; | import H3 from '/components/h3'; | ||||
import { Container, GradientSpacer } from '/components/atoms'; | import { Container, GradientSpacer } from '/components/atoms'; | ||||
import coinupdown from '/public/animations/coin-up-down.json'; | import coinupdown from '/public/animations/coin-up-down.json'; | ||||
import coinflip from '/public/animations/exchanges-coin-flip.json'; | import coinflip from '/public/animations/exchanges-coin-flip.json'; | ||||
import services from '/public/animations/services.json'; | import services from '/public/animations/services.json'; | ||||
import mining from '/public/animations/mining.json'; | |||||
import { | import { | ||||
DescriptionBox, | DescriptionBox, | ||||
ImgCtn, | ImgCtn, | ||||
TilesOuterCtn, | TilesOuterCtn, | ||||
TitleBox, | TitleBox, | ||||
Tile, | Tile, | ||||
TileImgCtn, | TileImgCtn, | ||||
BlankTile, | BlankTile, | ||||
MiningSectionCtn, | |||||
MiningImg, | |||||
} from '/styles/pages/get-ecash.js'; | } from '/styles/pages/get-ecash.js'; | ||||
import AnimateImage from '/components/animate-image'; | import AnimateImage from '/components/animate-image'; | ||||
import { getScoreCardData } from '/data/scores.js'; | import { getScoreCardData } from '/data/scores.js'; | ||||
import Button from '/components/button'; | |||||
function TileSection({ title, items }) { | function TileSection({ title, items }) { | ||||
return ( | return ( | ||||
<> | <> | ||||
<TitleBox>{title}</TitleBox> | <TitleBox>{title}</TitleBox> | ||||
<TilesOuterCtn> | <TilesOuterCtn> | ||||
{items.map((item, index) => { | {items.map((item, index) => { | ||||
if (item === '') { | if (item === '') { | ||||
▲ Show 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | return ( | ||||
<H3 text="Services" id="services" /> | <H3 text="Services" id="services" /> | ||||
<p>Check out eCash service partners.</p> | <p>Check out eCash service partners.</p> | ||||
</div> | </div> | ||||
<ImgCtn height="600px"> | <ImgCtn height="600px"> | ||||
<AnimateImage image={services} speed={0.5} reverse /> | <AnimateImage image={services} speed={0.5} reverse /> | ||||
</ImgCtn> | </ImgCtn> | ||||
</DescriptionBox> | </DescriptionBox> | ||||
<TileSection title="Services" items={props.services} /> | <TileSection title="Services" items={props.services} /> | ||||
<MiningSectionCtn> | |||||
<div> | |||||
<H3 text="Mining" id="mining" /> | |||||
<p> | |||||
eCash is also available through mining, to learn | |||||
more join our ever expanding community of miners. | |||||
</p> | |||||
<Button | |||||
text="Get Started" | |||||
link="https://e.cash/blog/xec-ecash-mining" | |||||
corner="bottomRight" | |||||
color="accent" | |||||
/> | |||||
</div> | |||||
<MiningImg height="500px"> | |||||
<AnimateImage image={mining} reverse /> | |||||
</MiningImg> | |||||
</MiningSectionCtn> | |||||
</Container> | </Container> | ||||
</Layout> | </Layout> | ||||
); | ); | ||||
} | } | ||||
/** | /** | ||||
* Call function to fetch scorecard api data and return scored and sorted arrays. | * Call function to fetch scorecard api data and return scored and sorted arrays. | ||||
* This only runs at build time, and the build should fail if the api call fails | * This only runs at build time, and the build should fail if the api call fails | ||||
Show All 11 Lines |