Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Prince/ from Pavel Latyshou - update landing page for each Crypto E-Book based on language #2599

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified src/images/common/ebooks/crypto-hero-es.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/common/ebooks/crypto-hero-fr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/common/ebooks/crypto-hero-pt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/common/ebooks/crypto-inside-es.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/common/ebooks/crypto-inside-fr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/common/ebooks/crypto-inside-pt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 30 additions & 5 deletions src/pages/landing/ebooks/crypto.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { SEO } from 'components/containers'
import { localize, WithIntl } from 'components/localization'
import StocksIntroImage from 'images/svg/landing/crypto-intro.svg'

const topicsCovered = [
const topics_covered = [
localize('Introduction to cryptocurrencies'),
localize('Types of cryptocurrencies'),
localize('The basics of trading cryptocurrency'),
Expand All @@ -27,10 +27,35 @@ const query = graphql`
crypto_inside: file(relativePath: { eq: "ebooks/crypto-inside.png" }) {
...bannerImage
}
crypto_hero_es: file(relativePath: { eq: "ebooks/crypto-hero-es.png" }) {
...bannerImage
}
crypto_inside_es: file(relativePath: { eq: "ebooks/crypto-inside-es.png" }) {
...bannerImage
}
crypto_hero_pt: file(relativePath: { eq: "ebooks/crypto-hero-pt.png" }) {
...bannerImage
}
crypto_inside_pt: file(relativePath: { eq: "ebooks/crypto-inside-pt.png" }) {
...bannerImage
}
crypto_hero_fr: file(relativePath: { eq: "ebooks/crypto-hero-fr.png" }) {
...bannerImage
}
crypto_inside_fr: file(relativePath: { eq: "ebooks/crypto-inside-fr.png" }) {
...bannerImage
}
}
`

const StocksEbook = () => {
type StocksEbookProps = {
language: string
}

const StocksEbook = ({ language }: StocksEbookProps) => {
const ebook_languages = ['es', 'pt', 'fr']
const ebook_image = ebook_languages.includes(language) ? `_${language}` : ''

const data = useStaticQuery(query)
return (
<Layout type="landing-page" is_ppc_redirect={true}>
Expand All @@ -52,7 +77,7 @@ const StocksEbook = () => {
ebook_utm_code="cryptocurrencies-ebook"
introSub=""
introMain={localize('Learn how to trade cryptocurrencies with Deriv')}
mainHeaderImage={data['crypto_hero']}
mainHeaderImage={data[`crypto_hero${ebook_image}`]}
/>
<ImageText
imageWidth={282}
Expand All @@ -66,8 +91,8 @@ const StocksEbook = () => {
/>
<Topics
title={localize('In this e-book we will cover')}
topicsImage={data['crypto_inside']}
topicsList={topicsCovered}
topicsImage={data[`crypto_inside${ebook_image}`]}
topicsList={topics_covered}
/>
<WhatOurClientsSay />
<Signup appearance={Appearances.public} />
Expand Down