Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
Deriv.com New Homepage 🌐 (#6007)
Browse files Browse the repository at this point in the history
* chore: added quick translations

* chore: update ts to tsx

* chore: test trigger

* chore: revert test

* chore: added strings from data

* chore: updated strings

* Michio/setup migration branch beta (#6039)

* chore: added quill-desgin and blocks to homepage

* chore: updated deriv-com libs

* chore: added more section and block usage

* chore: updated images format and imports

* Update tsconfig.json

* chore: added base navigation for row

* chore: added base home hero

---------

Co-authored-by: Mohsen Hajibeigloo <[email protected]>
Co-authored-by: Habib Deriv <[email protected]>

* auto-pull-translation

* auto-pull-translation

* translation: 📚 sync translations from crowdin feature branch

* Prince/update homepage theme (#6058)

* Fix gtm partytown integration (#6038)

* chore: fix gtm partytown integration

* chore: remove defer

Downloading the script asynchronously is enough

* chore: default theme to light

---------

Co-authored-by: Habib Deriv <[email protected]>

* chore: home v2 hero (#6059)

* chore: home v2 hero image

* chore: overflow hidden

* empty: 🚀 to redeploy and trigger build

* chore: added @parcel/watcher

---------

Co-authored-by: Michio <[email protected]>

* Fasih: updated stats component (#6060)

* chore: updated stats component

* chore: added chore value

---------

Co-authored-by: Fasih Ali <[email protected]>

* chore: removed tailwind merge package (#6062)

Co-authored-by: Fasih Ali <[email protected]>

* Jia/add footer cta block (#6061)

* feat: update footer cta

* chore: update footer cta

* chore: update latest

* chore: update footer cta

* Jia/footer cta fix (#6063)

* feat: added the start trading steps (#6069)

* nuzhy/update navigation and footer, illustrations (#6078)

* chore: update latest navigation

fixed the footer responsive issue

updated the illustrations

* chore: update navigation links in header navigation, footer

updated quill-design, quill-icons, deriv-com-libs

* Hasan/Translation 375 live pricing block (#6092)

* chore: added live market blocks

* chore: fixed description

* chore: updated package

* chore: implemented tabs for user friendly section (#6095)

Co-authored-by: meenu-deriv <[email protected]>

* chore: integrate language switcher (#6109)

* chore: platform section (#6108)

* chore: platform section

* chore: remove fragment

---------

Co-authored-by: Michio <[email protected]>

* Jia/fix button desktop only (#6093)

* feat: update footer cta

* chore: update latest

* fix: cta button only show on desktop size

* chore: uncomment

* chore: remove unwanted image

* chore: solve livemarket issue

* chore: clean code

* fix: hide button for mobile and tablet

* chore: fix package-lock

* fix: footer download images, paddings (#6114)

* chore: fixed tab blocks (#6116)

* chore: language switch based on selection (#6120)

* Jia/trade type options (#6119)

* feat: update footer cta

* chore: update latest

* fix: trade type option background colour and icon size

* chore: remove img

* Jia/fasih: / fast payment section DPROD-378 (#6088)

* feat: update footer cta

* chore: update latest

* feat: fast payment section

* chore: nothing

* chore: added data for infinte carousel

* fix: removed unused code

* fix: removed bg image

---------

Co-authored-by: jia-deriv <[email protected]>
Co-authored-by: Fasih Ali <[email protected]>

* Jia/remove darkmode toggle (#6122)

* feat: update footer cta

* chore: update latest

* chore: remove theme toggle

* chore: cleanup code

* nuzhy/added language direction change (#6123)

* chore: added language direction change

* fix: added comment to remove preview domain in future

* fix: added localize text for translation (#6127)

Co-authored-by: Michio <[email protected]>

* Prince/added trustpilot section (#6137)

* chore: truspilot rendering

* chore: update package versions

* chore: added translation for trustpilot texts

* chore: temp static data

* Nuzhy/footer fixes (#6142)

* chore: update deriv-com-libs

fix: deriv-go banner font issues

* fix: start trading card title font sizes

* Fasih/Update eu content (#6139)

* chore: added EU data also need to fix some issues

* fix: fixed package-lock file

* fix: fixed object position for cta section

---------

Co-authored-by: Fasih Ali <[email protected]>

* auto-pull-translation

* auto-pull-translation

* translation: 📚 sync translations from crowdin feature branch

* auto-pull-translation

* chore: removed lmdb

* chore: updated cards data (#6168)

* auto-pull-translation

* translation: 📚 sync translations from crowdin feature branch

* fix: updated the navigation, footer texts for translation (#6178)

* Hasan/Translation 00 fix market and platforms (#6180)

* chore: updated live market bottom data

* chore: udpated packages and platform data

* chore: fixed designers suggestions for hero content (#6174)

* chore: fixed designers suggestions for hero content

* chore: fixed hero height for tablet and desktop

* chore: fixed hero height for tablet and desktop

* chore: fixed hero image height

* chore: fixed hero image height for mobile

* chore: updated header button text

* chore: updated years data

* chore: updated years data

* chore: updated gap between hero content and award image

* chore: updated gap between hero content and award image

* chore: updated award images alt text

* chore: inprogress of adding link (#6159)

* chore: inprogress of adding link

* chore: fixed link component issue

* chore: added keys for new tab redirection

* chore: updated key

* chore: updated nav data for UE

* chore: updated footer and header nav

* chore: added target blank condition

* chore: chore updated target blank in data

---------

Co-authored-by: Fasih Ali <[email protected]>

* fix: text for trustpilot (#6181)

* chore: added live pricing logic (#6183)

* chore: updated all localize component (#6187)

* chore: cta setup (#6188)

* auto-pull-translation

* translation: 📚 sync translations from crowdin feature branch

* Hasan/Translation 00 hero fix 3 (#6192)

* chore: added format and loading in all hero images

* chore: removed hero bg eu image

* chore: updated hero subject image eu

* chore: fixed company background (#6196)

* chore: fixed item position (#6194)

Co-authored-by: Fasih Ali <[email protected]>

* fix: navigation subtasks (#6198)

* fix: remove the testlink added for temporary (#6211)

* fix: description changes (#6210)

* Fasih/: added updated changes of blocks (#6225)

* chore: added updated pull

* chore: added speed

---------

Co-authored-by: Fasih Ali <[email protected]>

* Fasih/: added 3x images (#6219)

* fix: added 3x images

* chore: added lazy loading insted to eager

---------

Co-authored-by: Fasih Ali <[email protected]>

* Prince/DPROD-379/Fetch TrustPilot on build time (#6193)

* chore: initial poc

* chore: updated key structure

* chore: trustpilot on commit fetch

* chore: updated packages and generated data to json instead

* chore: fetch trustpilot data on build

* chore: reset data to test if fetching is working

* chore: removed fixed todos

* chore: fix comment

* chore: simplified on build fetching

* chore: add api keys on workflow

* chore: removed unnecessary ignored files

* chore: remove unnecessary change

* chore: remove unnecessary change

* auto-pull-translation

* translation: 📚 sync translations from crowdin feature branch

* chore: default trustpilot values

* fix: issue on rendering trustpilot data (#6246)

* Hasan/Translation 2017 quill platform fix (#6247)

* chore: fix eu platfrom card contnet

* chore: updated quill-design pacakge

* Fasih/fix infinite carousel speed (#6242)

* chore: added updated pull

* chore: added speed

* chore: udpated data

* chore: updated time duration

---------

Co-authored-by: Fasih Ali <[email protected]>

* chore: follow gatsby convention

* Hasan/chore: fixed link component for eu (#6261)

* chore: fixed link component for eu

* chore: remove target from social links

* chore: added show eu modal condition

* chore: show modal condition for href

* chore: show modal condition for href

* chore: removed unused type

* chore: updated deriv-com pacakges

* chore: updated alert button onclick

* Hasan/chore: fixed live market issues (#6244)

* chore: sliced live market data

* chore: fixed slider issues

* chore: fixed edge slider issues

* chore: added click handler for live market card

* chore: updated live market buy sell click handler

* chore: updated live market buy sell click handler

* chore: updated live market buy sell click handler

* chore: updated live market bottom content

* chore: updated live market hook for stock and indices

* chore: updated deriv-com pacakges

* Hasan/Pr 00 quill remove floating cta (#6279)

* chore: removed floating cta

* empty: 🚀 to redeploy and trigger build

* chore: removed floating cta

* auto-pull-translation

* translation: 📚 sync translations from crowdin feature branch

* chore: retrigger build

* Hasan/Pr 375 live market issues 2 (#6288)

* chore: fixed live market bottom link

* chore: fixed live market bottom link

* chore: updated market icons

* chore: updated tab trigger content

* chore: fixed card status

* chore: added commoditiees icon

* chore: removed parcel

* chore: updated parcel

* Hasan/chore: added media query based on height for hero award images (#6287)

* chore: added media query based on height for hero award images

* chore: added new parcel lib as optional

* chore: updated media query height

* auto-pull-translation

* Prince/New homepage master update (#6356)

* chore: merge master to new-homepage-translation

* chore: quill-icon stable version usage

* auto-pull-translation

* fix: package-lock file

* auto-pull-translation

* translation: 📚 sync translations from crowdin feature branch

* Nuzhy/_/quill icons issue (#6386)

* fix: quill-icons issue

* fix: revert trustpilot review score

* fix: update LabelPairedGridLgBoldIcon

* Nuzhy/QUILL-1290/Update Home page (#6392)

* fix: remove navigation, footer, providers which are integrated in layout

* fix: deleted footer, navigation files from home page

* Prince/Trustpilot debug (#6383)

* auto-pull-translation

* translation: 📚 sync translations from crowdin feature branch

* Aswathy/Steps homepage gap (#6382)

* Hasan/Pr 00 add prefix to atomic css (#6334)

* chore: added prefix to tryphography class

Signed-off-by: hasan-deriv <[email protected]>

* chore: added prefix to radius classes

Signed-off-by: hasan-deriv <[email protected]>

* chore: added prefix to spacing classes

Signed-off-by: hasan-deriv <[email protected]>

* chore: added prefix to color classes

Signed-off-by: hasan-deriv <[email protected]>

* chore: added prefix to flex classes

Signed-off-by: hasan-deriv <[email protected]>

* chore: added prefix to container classes

Signed-off-by: hasan-deriv <[email protected]>

* chore: added prefix to table classes

Signed-off-by: hasan-deriv <[email protected]>

* chore: added prefix to alert classes

Signed-off-by: hasan-deriv <[email protected]>

* chore: added prefix to tabs classes

Signed-off-by: hasan-deriv <[email protected]>

* chore: added prefix to accordion classes

Signed-off-by: hasan-deriv <[email protected]>

* chore: added prefix to icon classes

Signed-off-by: hasan-deriv <[email protected]>

* chore: added prefix to input classes

Signed-off-by: hasan-deriv <[email protected]>

* chore: added prefix to checkbox classes

Signed-off-by: hasan-deriv <[email protected]>

* chore: added prefix to visibility classes

Signed-off-by: hasan-deriv <[email protected]>

* chore: added prefix to utility classes

Signed-off-by: hasan-deriv <[email protected]>

* chore: updated utils functions

Signed-off-by: hasan-deriv <[email protected]>

* chore: updated quill icons package

Signed-off-by: hasan-deriv <[email protected]>

* chore: updated classname types

Signed-off-by: hasan-deriv <[email protected]>

* chore: updated class names in accordion component

Signed-off-by: hasan-deriv <[email protected]>

* chore: updated class names in alert component

Signed-off-by: hasan-deriv <[email protected]>

* chore: updated class names in card component

Signed-off-by: hasan-deriv <[email protected]>

* chore: updated class names in container component

Signed-off-by: hasan-deriv <[email protected]>

* chore: updated class names in flex component

Signed-off-by: hasan-deriv <[email protected]>

* chore: updated class names in icon component

Signed-off-by: hasan-deriv <[email protected]>

* chore: updated class names in input and checkbox component

Signed-off-by: hasan-deriv <[email protected]>

* chore: updated class names in link component

Signed-off-by: hasan-deriv <[email protected]>

* chore: updated class names in tab component

Signed-off-by: hasan-deriv <[email protected]>

* chore: updated class names in table component

Signed-off-by: hasan-deriv <[email protected]>

* chore: updated class names in typography component

Signed-off-by: hasan-deriv <[email protected]>

* chore: updated class names in molecules components

Signed-off-by: hasan-deriv <[email protected]>

* chore: updated class names in organisms components

Signed-off-by: hasan-deriv <[email protected]>

* chore: updated class names in templates components

Signed-off-by: hasan-deriv <[email protected]>

* chore: updated class names in pages components

Signed-off-by: hasan-deriv <[email protected]>

---------

Signed-off-by: hasan-deriv <[email protected]>

* auto-pull-translation

* auto-pull-translation

* translation: 📚 sync translations from crowdin feature branch

* Hasan/Pr 2169 quill layout (#6346)

* chore: updated eslint rule

* chore: updated gatsby browser

* chore: added anchor component

* chore: added broser alert component

* chore: added layout overlay components

* chore: added quill layout component

* chore: removed css from layout component

* chore: added quill layout to homepage

* chore: removed css from page component

* chore: added block and component css to global css

* chore: removed ibm and ubuntu fonts

* chore: updated tailwind config

* auto-pull-translation

* chore: removed block and component css from gatsby browser

* chore: removed block and component css from layout

* chore: updated quill layout

* chore: updated banner font size

* empty: 🚀 to redeploy and trigger build

* chore: updated blocks (#6289)

* chore: updated blocks

* chore: updated with libs

* fix: font size in eu changed

* fix: added the space issue

---------

Co-authored-by: fasihali-deriv <[email protected]>
Co-authored-by: aswathy-deriv <[email protected]>

* chore: request translation (#6455)

* chore: request translation

* fix: space

* fix: unwanted words

* Hasan/DPROD-2094/cfd banner fix (#6457)

* auto-pull-translation

* chore: updated cfd banner css

* chore: updated font size breakpoint to xl

* auto-pull-translation

* auto-pull-translation

* translation: 📚 sync translations from crowdin feature branch

* Aswathy/Fast hassle issues (#6384)

* fix: updated the package

* fix: added the description for row

* fix: payment block issues

* Meenu/1334/Translation 1334 meenu 3 simple steps sub task (#6450)

* fix: 3 steps subtask fix

* empty: 🚀 to redeploy and trigger build

* empty: 🚀 to redeploy and trigger build

* auto-pull-translation

* translation: 📚 sync translations from crowdin feature branch

* Hasan/DPROD-2159/live market card tarnslation fix (#6473)

* auto-pull-translation

* chore: added live market localize content

* auto-pull-translation

* translation: 📚 sync translations from crowdin feature branch

* {DPRO-378}/ Translation 378 fix fast hassle block subtask (#6494)

* fix: fix subtask

* fix: fix changes

* chore: updated icon package

* chore: pr build failure fix

* chore: pr build failure fix

* Meenu/{DPROD-2331}/Translation 2331 fixx cta button 3 steps (#6496)

* fix: fix subtask

* fix: removed wrong commit

* fix: fix changes

* fix: fixed icon

* fix: fixed conflicts

* fix: updated with upstream

* Pr 2169 quill layout fixes (#6462)

* auto-pull-translation

* chore: fixed ubuntu fonts

* chore: fixed floating button bg color

* chore: updated gatsby browser

* chore: updated gatsby browser and global css file

* chore: updated global css

* chore: updated overlay css

* chore: updated tailwind config

* chore: cleanup

* chore: updated global css and gatsby-browser

* auto-pull-translation

* chore: moved block css to gatsby browser from global css

* Meenu/{DPROD-2331}/Pr 2331 gap issue for 3 steps (#6515)

* fix: fixed padding issue

* fix: fixed gap issue

* Hasan/Pr 00 quill floating cta (#6406)

* chore: added floating cta

* chore: added logged in condition

* chore: updated floating cta root margin

* auto-pull-translation

* chore: fixed the EU issue

* chore: cleanup

* chore: updated z index of floating cta

* chore: moved unexpanded text to different component to get the correct ref

* chore: removed unwanted file

* chore: removed console

* chore: updated layout overlay z index

* chore: updated cta bottom height

* chore: updated floating cta hook

* auto-pull-translation

* chore: removed floating cta hook and moved all the implementation to provider

* chore: updated the breakpoint

* chore: updated floating cta component

* chore: updated different ref conditon for mobile and tablet

* chore: updated floating cta blur and bg

* chore: moved all cfd banner mobile text and desktop text in different component

* chore: added expanded state to ctabottom useeffect

* chore: synched floating button with cta

* chore: updated floating button mb

* auto-pull-translation

* auto-pull-translation

* translation: 📚 sync translations from crowdin feature branch

* empty: 🚀 to redeploy and trigger build

* chore: added 2 more commands to update other external libs (#6467)

* chore: added 2 more commands to update other external libs

* translation: 📚 sync translations from crowdin feature branch

---------

Co-authored-by: DerivFE <[email protected]>

* auto-pull-translation

* auto-pull-translation

* translation: 📚 sync translations from crowdin feature branch

* empty: 🚀 to redeploy and trigger build

* Pr 00 overlay fixes (#6585)

* auto-pull-translation

* chore: moved all the responsive css to css module

* auto-pull-translation

* Hasan/2170/eutestlink hero (#6472)

* chore: added region loading condiition

* chore: added region loading condition to text

* chore: added region loading condition to image

* chore: removed console

* chore: added is eu domain condition to hero content

* auto-pull-translation

* chore: updated is_eu condition

* chore: updated is_eu condition

* chore: hero eu testing

* auto-pull-translation

* chore: added browser logic to hero imagge

* chore: added browser logic to hero imagge

* auto-pull-translation

* chore: added browser logic to hero image

* chore: added browser logic to hero image

* chore: added browser logic to hero image

* chore: cleanup

* chore: cleanup

* chore: fetching total trustpilot reviews (#6657)

* auto-pull-translation

* translation: 📚 sync translations from crowdin feature branch

* hasan/Pr 00 rtl issue fix (#6451)

* auto-pull-translation

* chore: updated cta block

* auto-pull-translation

* chore: fixed ubuntu fonts

* chore: fixed floating button bg color

* chore: updated gatsby browser

* chore: updated gatsby browser and global css file

* chore: updated global css

* chore: updated overlay css

* chore: updated tailwind config

* chore: cleanup

* chore: updated global css and gatsby-browser

* chore: added rtl classes for hero content and award images

* chore: removed rtl dir from hero section

* auto-pull-translation

* chore: moved block css to gatsby browser from global css

* chore: updated deriv packages

* chore: updated deriv packages

* auto-pull-translation

* chore: live market description link fix

* chore: updated deriv packages

* auto-pull-translation

* empty: 🚀 to redeploy and trigger build

* chore: updated deriv packages

* chore: updated fast payment animation

* chore: updated fast payment animation

* auto-pull-translation

* chore: removed unused classname

* auto-pull-translation

* auto-pull-translation

* chore: added rtl class to hero

* Hasan/Pr 375 live market fix (#6436)

* auto-pull-translation

* chore: updated live market icons

* chore: updated stock and indices array

* chore: updated indices type

* chore: added rest market icons

* chore: updated forex description for EU

* chore: updated deriv packages

* chore: added mid value to live market data

* auto-pull-translation

* chore: updated market icon

* chore: updated deriv packages

* auto-pull-translation

* chore: updated deriv packages

* chore: updated deriv packages

* chore: updated market icon

* auto-pull-translation

* chore: moved instrument truncate css to styles css

* auto-pull-translation

* chore: updated market icon

* chore: updated deriv packages

* chore: updated 20 years slider class

* chore: updated live market hook

* chore: updated live market hook

* Hasan/Pr 00 live market icon (#6706)

* auto-pull-translation

* chore: added derived indices eu icons

* fix: ⏪ add missing classname (#6717)

* Pr 00 swiper issue (#6712)

* auto-pull-translation

* chore: added mr to swiper slide

* Hasan/Pr 00 cta fix (#6742)

* auto-pull-translation

* chore: fixed floating cta issue

* chore: removed comment

* chore: removed console

* chore: updated condiition

* Mitra/DPROD-2166/Improve seo and accessibility (#6738)

* fix: 🔍 improve seo and accessibility

* Revert "Remove whatsapp icon" (#6739)

* empty: 🚀 to redeploy and trigger build

* fix: 🔍 improve seo

* fix: 🔍 update packages

---------

Co-authored-by: Habib Deriv <[email protected]>

---------

Signed-off-by: hasan-deriv <[email protected]>
Co-authored-by: Michio <[email protected]>
Co-authored-by: Michio <[email protected]>
Co-authored-by: Mohsen Hajibeigloo <[email protected]>
Co-authored-by: Habib Deriv <[email protected]>
Co-authored-by: DerivFE <[email protected]>
Co-authored-by: Hasan Mobarak <[email protected]>
Co-authored-by: fasihali-deriv <[email protected]>
Co-authored-by: Fasih Ali <[email protected]>
Co-authored-by: jia-deriv <[email protected]>
Co-authored-by: Aswathy-Deriv <[email protected]>
Co-authored-by: Nuzhy-Deriv <[email protected]>
Co-authored-by: meenakshi-deriv <[email protected]>
Co-authored-by: meenu-deriv <[email protected]>
Co-authored-by: jia-deriv <[email protected]>
Co-authored-by: fasihali-deriv <[email protected]>
Co-authored-by: aswathy-deriv <[email protected]>
Co-authored-by: mayuran-deriv <[email protected]>
Co-authored-by: mitra-deriv <[email protected]>
Co-authored-by: mitra-deriv <[email protected]>
  • Loading branch information
20 people authored Jan 18, 2024
1 parent 2df9a02 commit 22e3ce9
Show file tree
Hide file tree
Showing 212 changed files with 12,554 additions and 9,642 deletions.
5 changes: 5 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@
"pattern": "features/components/templates/layout",
"group": "parent",
"position": "after"
},
{
"pattern": "features/components/quill/quill-layout",
"group": "parent",
"position": "after"
}
],
"newlines-between": "never"
Expand Down
243 changes: 171 additions & 72 deletions crowdin/messages.json

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions gatsby-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ import {
updateURLAsPerUserLanguage,
} from 'common/utility'
import './static/css/noto-sans-arabic.css'
import 'swiper/swiper-bundle.min.css'
import 'features/styles/app.scss'
import './static/css/ubuntu.css'
import './static/css/global.css'
import '@deriv-com/blocks/style.css'
import '@deriv-com/components/style.css'
import '@deriv-com/blocks/style.css';

const is_browser = typeof window !== 'undefined'

Expand Down
29 changes: 28 additions & 1 deletion gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,39 @@ const language_config = require(`./i18n-config.js`)
const language_config_en = require(`./i18n-config-en.js`)
const path = require('path')
const { copyLibFiles } = require('@builder.io/partytown/utils')

const { exec } = require('child_process')
const translations_cache = {}

function OSFunction() {
this.execCommand = function (cmd, callback) {
exec(cmd, (error, stdout) => {
if (error) {
console.error(`exec error: ${error}`)

Check warning on line 13 in gatsby-node.js

View workflow job for this annotation

GitHub Actions / ESLint

gatsby-node.js#L13

Unexpected console statement (no-console)
return
}

callback(stdout)
})
}
}

const fetchTrustpilotData = () => {
// Trustpilot on-build data fetching
const os = new OSFunction()

os.execCommand('node scripts/trustpilot.js', (returnvalue) => {
console.log(returnvalue)

Check warning on line 27 in gatsby-node.js

View workflow job for this annotation

GitHub Actions / ESLint

gatsby-node.js#L27

Unexpected console statement (no-console)
})
}

exports.onPreBuild = async () => {
await copyLibFiles(path.join(__dirname, 'static', '~partytown'))
}
exports.onPreInit = () => {
// Update truspilot.json file with latest data
fetchTrustpilotData()
}

// Based upon https://github.com/gatsbyjs/gatsby/tree/master/examples/using-i18n

const BuildPage = (page, actions) => {
Expand Down
1,519 changes: 994 additions & 525 deletions package-lock.json

Large diffs are not rendered by default.

19 changes: 12 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
"dependencies": {
"@artsy/fresnel": "^6.2.1",
"@builder.io/partytown": "^0.8.1",
"@deriv-com/blocks": "^0.73.0",
"@deriv-com/components": "^0.43.0",
"@deriv-com/blocks": "^0.79.0",
"@deriv-com/components": "^0.47.0",
"@deriv-com/hooks": "^0.10.0",
"@deriv-com/providers": "^0.11.0",
"@deriv/analytics": "^1.4.3",
"@deriv/analytics": "^1.4.4",
"@deriv/deriv-api": "^1.0.13",
"@deriv/quill-design": "^1.3.2",
"@deriv/quill-icons": "^1.1.5",
"@deriv/quill-design": "^1.2.16",
"@deriv/quill-icons": "^1.1.13",
"@hookform/resolvers": "^3.3.2",
"@livechat/customer-sdk": "^3.1.5",
"@loadable/component": "^5.15.3",
Expand Down Expand Up @@ -63,7 +63,7 @@
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-date-picker": "8.4.0",
"react-device-detect": "^2.2.2",
"react-device-detect": "^2.2.3",
"react-dom": "^18.2.0",
"react-hook-form": "^7.48.2",
"react-i18next": "^11.18.6",
Expand Down Expand Up @@ -159,7 +159,9 @@
"scripts": {
"analyze-bundle": "GENERATE_JSON_STATS=true gatsby build && npx webpack-bundle-analyzer -m static -r ./webpack-bundle-report/report.html ./public/stats.json",
"build": "GATSBY_CPU_COUNT=2 gatsby build --log-pages",
"update:deriv-com-libs": "npm i @deriv-com/blocks@latest @deriv-com/components@latest @deriv-com/hooks@latest @deriv-com/providers@latest",
"update:deriv-com-libs": "npm i @deriv-com/blocks@latest @deriv-com/components@latest @deriv-com/hooks@latest @deriv-com/providers@latest @deriv/quill-design@latest",
"update:quill-libs": "npm i @deriv/quill-design@latest @deriv/quill-icons@latest",
"update:all-libs": "npm run update:quill-libs; npm run update:deriv-com-libs",
"partytown": "partytown copylib public/~partytown",
"develop": "GATSBY_CPU_COUNT=2 gatsby develop -o",
"format": "prettier --write '**/*.js' '*.js'",
Expand Down Expand Up @@ -208,5 +210,8 @@
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
},
"optionalDependencies": {
"@parcel/watcher-linux-x64-glibc": "^2.3.0"
}
}
72 changes: 72 additions & 0 deletions scripts/trustpilot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
const fs = require('fs')
const path = require('path')
require('dotenv').config();

const fetchTrustpilotData = async () => {
const fileDir = path.resolve(__dirname, '../src/data')
const fileName = 'trustpilot.json'
const filePath = path.join(fileDir, fileName)

const startTime = Date.now()

try {
const appName = 'deriv.com'
const apiKey = process.env.GATSBY_TRUSTPILOT_API_KEY

if (!appName || !apiKey) {
throw new Error('Trustpilot app name or API key is missing')
}

const url = `https://api.trustpilot.com/v1/business-units/find?name=${appName}&apikey=${apiKey}`
const response = await fetch(url)

if (!response.ok) {
throw new Error(`Network response was not ok: ${response.statusText}`)
}

const result = await response.json()

const endTime = Date.now()
const timeSpentInSeconds = (endTime - startTime) / 1000

console.log(

Check warning on line 32 in scripts/trustpilot.js

View workflow job for this annotation

GitHub Actions / ESLint

scripts/trustpilot.js#L32

Unexpected console statement (no-console)
`\x1b[32msuccess\x1b[0m trustpilot data fetching finished - ${timeSpentInSeconds}s`,
)

const tpData = {
stars: result.score?.stars || 0,
trustScore: result.score?.trustScore || 0,
numberOfReviews:
result.numberOfReviews?.total.toLocaleString() || '',
}

const fileContent = JSON.stringify(tpData,null,2)

fs.writeFile(filePath, fileContent, (error) => {
if (error) {
// Handle errors
console.error('Error writing to the file:', error);

Check warning on line 48 in scripts/trustpilot.js

View workflow job for this annotation

GitHub Actions / ESLint

scripts/trustpilot.js#L48

Unexpected console statement (no-console)
}

fs.readFile(filePath, 'utf8', (err, data) => {
if (err) {
console.error(`Error reading the file: ${err}`);

Check warning on line 53 in scripts/trustpilot.js

View workflow job for this annotation

GitHub Actions / ESLint

scripts/trustpilot.js#L53

Unexpected console statement (no-console)
return;
}

try {
const jsonData = JSON.parse(data);
console.log('Trust Pilot Data:', jsonData);

Check warning on line 59 in scripts/trustpilot.js

View workflow job for this annotation

GitHub Actions / ESLint

scripts/trustpilot.js#L59

Unexpected console statement (no-console)
} catch (error) {
console.error(`Error parsing JSON: ${error}`);

Check warning on line 61 in scripts/trustpilot.js

View workflow job for this annotation

GitHub Actions / ESLint

scripts/trustpilot.js#L61

Unexpected console statement (no-console)
}
});
});

} catch (error) {
console.log(error)

Check warning on line 67 in scripts/trustpilot.js

View workflow job for this annotation

GitHub Actions / ESLint

scripts/trustpilot.js#L67

Unexpected console statement (no-console)
}
}

fetchTrustpilotData()

5 changes: 5 additions & 0 deletions src/data/trustpilot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"stars": 4.5,
"trustScore": 4.6,
"numberOfReviews": "30,000"
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,21 @@ const icons: AccordionIcons = {

const AccordionItem = React.forwardRef<HTMLDivElement, TAccordionItem>(
({ children, className, item_title, icon_type = 'chevron', ...props }, ref) => (
<Accordion.Item className={'accordion_item'} ref={ref} {...props}>
<Accordion.Item className={'at-accordion_item'} ref={ref} {...props}>
<Accordion.Header>
<Accordion.Trigger className={dclsx('accordion_trigger', 'bg-color-primary')}>
<Accordion.Trigger className={dclsx('at-accordion_trigger', 'at-bg-color-primary')}>
<Typography.Heading size={'xs'}>
<Localize translate_text={item_title} />
</Typography.Heading>
<Icon
src={icons[icon_type]}
className={'accordion_icon'}
className={'at-accordion_icon'}
alt={'chevron'}
size={'large'}
/>
</Accordion.Trigger>
</Accordion.Header>
<Accordion.Content className={dclsx('accordion_content', className)}>
<Accordion.Content className={dclsx('at-accordion_content', className)}>
<div className="AccordionContentText">{children}</div>
</Accordion.Content>
</Accordion.Item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const AccordionRoot = React.forwardRef<
>(({ className, ...rest }, ref) => {
return (
<Accordion.Root
className={dclsx(className, 'accordion_root', 'bg-color-primary')}
className={dclsx(className, 'at-accordion_root', 'at-bg-color-primary')}
{...rest}
ref={ref}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@ interface TAccordionItem extends AccordionItemProps {

const AccordionShadowItem = React.forwardRef<HTMLDivElement, TAccordionItem>(
({ children, className, renderHeader, item_title, icon_type = 'chevron', ...props }, ref) => (
<Accordion.Item className={'accordion_item accordion_shadow_item'} ref={ref} {...props}>
<Accordion.Item
className={'at-accordion_item at-accordion_shadow_item'}
ref={ref}
{...props}
>
<Accordion.Header>
<Accordion.Trigger
className={dclsx(
'accordion_trigger accordion_shadow_item_trigger',
'bg-color-primary',
'padding-block-8x',
'border-radius-4x',
'at-accordion_trigger at-accordion_shadow_item_trigger',
'at-bg-color-primary',
'at-padding-block-8x',
'at-border-radius-4x',
)}
>
{renderHeader ? (
Expand All @@ -36,17 +40,20 @@ const AccordionShadowItem = React.forwardRef<HTMLDivElement, TAccordionItem>(
{icon_type === 'chevron' ? (
<Icon
src={Chevron}
className={'accordion_icon'}
className={'at-accordion_icon'}
alt={'chevron'}
size={'large'}
/>
) : (
<span className="accordion_icon plus_icon" />
<span className="at-accordion_icon at-plus_icon" />
)}
</Accordion.Trigger>
</Accordion.Header>
<Accordion.Content
className={dclsx('accordion_content accordion_shadow_item_content', className)}
className={dclsx(
'at-accordion_content at-accordion_shadow_item_content',
className,
)}
>
<div className="AccordionContentText">{children}</div>
</Accordion.Content>
Expand Down
4 changes: 2 additions & 2 deletions src/features/components/atoms/alert/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ const Alert = ({
return (
<AlertDialog.Root defaultOpen>
<AlertDialog.Portal>
<AlertDialog.Overlay className="alert-overlay" />
<AlertDialog.Content className="alert-content">
<AlertDialog.Overlay className="at-alert-overlay" />
<AlertDialog.Content className="at-alert-content">
<AlertDialog.Title asChild className="AlertDialogTitle">
<div>
<Typography.Heading as="h3" size="xxs" pb="12x">
Expand Down
2 changes: 1 addition & 1 deletion src/features/components/atoms/card/card-primary/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const CardPrimary = ({
)}
<Typography.Heading
as="h3"
className={dclsx(is_mobile_or_tablet ? 'text-large' : 'text-medium')}
className={dclsx(is_mobile_or_tablet ? 'at-text-large' : 'at-text-medium')}
pb="4x"
weight="bold"
>
Expand Down
2 changes: 1 addition & 1 deletion src/features/components/atoms/container/fixed/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ContentSectionTagOptions } from 'features/types'
import dclsx from 'features/utils/dclsx'

const FixedContainer = ({ className, ...rest }: BoxProps<ContentSectionTagOptions>) => {
const classnames = dclsx(className, 'container-fixed')
const classnames = dclsx(className, 'at-container-fixed')

return <Box className={classnames} {...rest} />
}
Expand Down
2 changes: 1 addition & 1 deletion src/features/components/atoms/container/fluid/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ContentSectionTagOptions } from 'features/types'
import dclsx from 'features/utils/dclsx'

const FluidContainer = ({ className, ...rest }: BoxProps<ContentSectionTagOptions>) => {
const classnames = dclsx(className, 'container-fluid')
const classnames = dclsx(className, 'at-container-fluid')

return <Box className={classnames} {...rest} />
}
Expand Down
14 changes: 7 additions & 7 deletions src/features/components/atoms/flex-box/box/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ const generateFlexClasses = (options: FlexBoxClasses, prefix?: string) => {
const classPrefix = prefix ? `${prefix}-` : ''

return dclsx({
[`${classPrefix}gap-${gap}`]: gap,
[`${classPrefix}align-items-${align}`]: align,
[`${classPrefix}justify-${justify}`]: justify,
[`${classPrefix}flex-wrap-${wrap}`]: wrap,
[`${classPrefix}flex-dir-${direction}`]: direction,
[`${classPrefix}at-gap-${gap}`]: gap,
[`${classPrefix}at-align-items-${align}`]: align,
[`${classPrefix}at-justify-${justify}`]: justify,
[`${classPrefix}at-flex-wrap-${wrap}`]: wrap,
[`${classPrefix}at-flex-dir-${direction}`]: direction,
})
}

Expand All @@ -59,10 +59,10 @@ const FlexBoxContainer = <T extends ContentSectionTagOptions>({
...rest
}: FlexBoxProps<T>) => {
const classnames = dclsx(
'flex',
'at-flex',
className,
{
[`container-${container}`]: container,
[`at-container-${container}`]: container,
},
generateFlexItemClasses({ align_self, grow, shrink, basis }),
generateFlexItemClasses(md ?? {}, 'md'),
Expand Down
8 changes: 4 additions & 4 deletions src/features/components/atoms/flex-box/item/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ export const generateFlexItemClasses = (options: FlexItemClasses, prefix = '') =
const classPrefix = prefix ? `${prefix}-` : ''
const { align_self, grow, shrink, basis } = options
return dclsx({
[`${classPrefix}align-self-${align_self}`]: align_self,
[`${classPrefix}flex-grow-${grow}`]: grow,
[`${classPrefix}flex-shrink-${shrink}`]: shrink,
[`${classPrefix}flex-basis-${basis}`]: basis,
[`${classPrefix}at-align-self-${align_self}`]: align_self,
[`${classPrefix}at-flex-grow-${grow}`]: grow,
[`${classPrefix}at-flex-shrink-${shrink}`]: shrink,
[`${classPrefix}at-flex-basis-${basis}`]: basis,
})
}

Expand Down
4 changes: 2 additions & 2 deletions src/features/components/atoms/icon/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ interface IconProps extends ImgHTMLAttributes<'img'>, ClassProps {
}

const Icon = ({ size = 'small', has_rtl, className, ...rest }: IconProps) => {
const classnames = dclsx(className, `icon-${size}`, 'icon', {
'icon-rtl': has_rtl,
const classnames = dclsx(className, `at-icon-${size}`, 'at-icon', {
'at-icon-rtl': has_rtl,
})

return <Box as={'img'} className={classnames} {...rest} />
Expand Down
2 changes: 1 addition & 1 deletion src/features/components/atoms/input/checkbox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const CheckboxInput = forwardRef<HTMLInputElement, InputHTMLAttributes<HTMLInput
return (
<Typography.Paragraph
as="label"
className={dclsx(className, 'checkbox_input_container')}
className={dclsx(className, 'at-checkbox_input_container')}
>
<input type={'checkbox'} {...rest} ref={ref} />
{children}
Expand Down
Loading

1 comment on commit 22e3ce9

@vercel
Copy link

@vercel vercel bot commented on 22e3ce9 Jan 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

deriv-com – ./

deriv-com-git-master.binary.sx
deriv-com.binary.sx

Please sign in to comment.