diff --git a/.eslintrc b/.eslintrc index 1802e11d057..c4962c8e2d7 100644 --- a/.eslintrc +++ b/.eslintrc @@ -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" diff --git a/crowdin/messages.json b/crowdin/messages.json index 83bc7d9983a..1ccb7d2a81f 100644 --- a/crowdin/messages.json +++ b/crowdin/messages.json @@ -42,7 +42,6 @@ "39595561": "See how your bot is performing as it executes each trade and receive notifications via Telegram.", "41078219": "Get into the Deriv Trader experience", "41570825": "Are High/Low Ticks options available on Deriv Trader?", - "42007661": "Get the widest range of markets, trades and platforms", "42762042": "Add stake amount to receive payout quote", "48132512": "Join and grow with us.", "48235639": "The potential payout and loss (your initial stake) amounts are clearly displayed before you open the trade.", @@ -58,6 +57,7 @@ "53801223": "Hong Kong 50", "54033225": "0.10", "54316667": "Trade natural resources that are central to the world’s economy and profit from the opportunities created by the markets.", + "55916349": "All", "56705073": "<0>ERX.US The Direxion Daily Energy Bull 2X Shares tracks the Energy Select Sector Index.", "56714378": "Frequently asked questions - Deriv P2P", "57395040": "Point Value", @@ -102,6 +102,7 @@ "85952646": "Yes, you can open multiple contracts with different parameters simultaneously.", "86747176": "They provide rewards that sound too good to be true.", "89633652": "A chart illustrating a losing Differs trade type contract", + "89863448": "Top trading assets and unique market indices", "92905834": "With these indices, there is an average of one drop (crash) or one spike (boom) in prices that occur in a <0>series of 500, or 1,000 ticks.", "94340092": "Asian options are available on the SmartTrader and Deriv Bot trading platforms. You can trade Asian options on synthetics.", "94412618": "Yes, you can customise the trade duration of your Only Ups/Only Downs contracts. The available time periods range from 2 ticks to 5 ticks.", @@ -136,6 +137,7 @@ "121961018": "If you're residing in the EU or UK, <0>contact us via live chat, and we'll help you with it.", "123005346": "No artificial barriers to customer withdrawals", "127307725": "A politically exposed person (PEP) is someone appointed with a prominent public position. Close associates and family members of a PEP are also considered to be PEPs.", + "127545561": "* Availability of payment methods and processing speeds may vary based on location and selected payment option", "128120244": "Since 1999, the Group has served traders around the world with integrity and reliability. We always hold ourselves to the highest ethical standards and regulatory requirements.", "131637194": "For <0>metals, there is a fixed commission of USD 4 per lot. A deal for 1 lot of XAU/USD will pay out USD 4 in commission based on the following formula:", "132319176": " take profit level", @@ -182,7 +184,6 @@ "176823932": "We may decline your verification documents if they are insufficiently clear, invalid, expired, or have cropped edges.", "176972763": "<0>GLD.US The SPDR Gold Shares ETF tracks the price of gold bullion in the over-the-counter (OTC) market.", "177720589": "If you hit <0>Yes, the details you entered will be lost, and you’ll need to restart the registration process.", - "179737767": "Our legacy options trading platform.", "180412186": "Predict whether the exit spot will be strictly higher or lower than the entry spot at the end of the contract period.", "181754600": "How can I identify emails from impersonators of Deriv customer support?", "182234515": "Choose the type of partner account you want to register", @@ -191,6 +192,7 @@ "186459036": "Your net profit will depend on how much the final price is above the predetermined strike price, with the maximum potential gains growing if the price of the underlying asset rises significantly. Your losses are limited to the initial stake required to purchase the call option.", "188128139": "CFDs - ETFs", "189421598": "What are the durations for Reset Call/Reset Put contracts?", + "191690145": "24/7 support", "192531494": "Advanced charting widgets", "192890975": "Can I open multiple accumulator contracts at the same time?", "193611235": "Exchange in minutes. Less waiting, more trading. Deposit and withdraw in minutes.", @@ -233,6 +235,7 @@ "231711709": "Trade anytime", "231722280": "What are commodities?", "233475101": "Read <0>this article to learn more about trading CFDs on Deriv.", + "233774478": "60+ global payment methods. Deposit instantly starting from just USD 5. Withdraw in minutes.*", "233805198": "Most trusted award", "234187697": "trader tools", "234782678": "You can reset your affiliate password <0>here.", @@ -314,13 +317,11 @@ "304202010": "How can I place a High/Low Ticks trade?", "305281565": "Are Only Ups/Only Downs available to trade on Deriv Trader?", "305547463": "User-friendly features", - "306400894": "Enjoy trading markets and indices mimicking actual market movements, with little to no disruption from real-world events.", "306846388": "Online trading is exciting but involves risks and can lead to an addiction. At Deriv, we look out for our customers’ best interests and encourage them to practise <0>secure and responsible trading. If you are new to this, you can also practise trading with unlimited virtual funds before you risk your money.", "307902006": "Enjoy high leverage and low spreads on our Deriv MT5 platform, now offering a range of stocks and stock indices from the brands you love.", "309180597": "Expand your client base by helping traders fund their accounts through local bank wires and e-payments. Facilitate and earn from every transaction.", "309993304": "Try Deriv at no risk", "310298121": "<0>Digital options that allow you to predict the outcome from two possible results and earn a fixed payout if your prediction is correct.", - "310888572": "A global online trading broker for forex, commodities & other financial markets. Sign up for a demo account and join over 2.5 million traders.", "311457810": "Our pip calculator helps you to estimate the pip value in your trades so that you can better manage your risk.", "311876462": "Send us an email with the following:", "315192357": "Swap rate", @@ -346,8 +347,8 @@ "332961148": "How can I add, remove or change my accepted payment methods?", "333367028": "(-(3400", "334005764": "What is Deriv Trader?", + "334011253": "1999", "335040248": "About us", - "336277289": "Available on <0>web browser", "337900732": "Denmark", "339084000": "LEGAL", "339879944": "GBP/USD", @@ -361,6 +362,7 @@ "349994198": "Multipliers on Crash and Boom", "350443733": "Fedex", "351335938": "ABOUT US", + "351773825": "We keep your personal data and funds safe.", "351897258": "Check Icon", "352494339": "Get trading with Deriv MT5", "353928381": "Why should I join the affiliate programme?", @@ -415,7 +417,6 @@ "401039438": "Have consistent, regular sign ups via your referral link", "401450104": "> 3 - 5 billion", "401498558": "Deriv (FX) Ltd (Company No. LL13394), incorporated on the 18th January 2017, is registered in the Federal Territory of Labuan (Malaysia) with its registered office located at Unit No. 3A-16, Level 3A, Labuan Times Square, Jalan Merdeka, 87000, Federal Territory of Labuan, Malaysia. Deriv (FX) Ltd is licensed by the Labuan Financial Services Authority <0>(view licence) and is a member of the <1>Labuan Fintech Association.", - "403435120": "Trade the way you want with 2 flexible trade types.", "405110755": "You can trade forex, cryptocurrencies, and derived on Deriv Trader. Some markets may not be available in certain countries.", "405259925": "Fast CFDs platform with inbuilt copy trading.", "406075956": "If you select ‘Odd’, you will win the payout if the last digit of the last tick is an odd number (i.e. 1, 3, 5, 7, or 9).", @@ -435,6 +436,7 @@ "417855021": "Name is required", "418173024": "Markets available for CFD trading", "419648873": "Trade global stocks and stock indices now on our DMT5 platform.", + "420909743": "You call the stocks", "421097985": "

Yes, you can enter multiple contracts at the same time. If you open multiple contract simultaneously, you'll get to diversify your trading portfolio and take advantage of various market opportunities.

Do note that the specific rules and limitations on the number of contracts you can enter simultaneously may vary depending on trade type. Some may have restrictions on the number of contracts you can open, while others may have other specific conditions that may allow for greater flexibility.

", "421158556": "You may refer to <0>our terms for more information. If you need help getting into your account, <1>contact us via live chat.", "421232681": "Additional terms", @@ -511,7 +513,6 @@ "480930125": "Start trading ETFs on Deriv in 3 simple steps", "481274667": "How can I withdraw funds from my Deriv MT5 real money account?", "481411401": "Regulation", - "482100031": "Trade the way you want with 3 exciting trade types.", "483166710": "You can open an Asians trade by:", "485805015": "Can I close a High/Low Ticks contract before the contract expires?", "486632400": "Open a digital options contract with a High/Low ticks trade type on Deriv’s trading platforms and earn payouts with accurate market predictions.", @@ -540,7 +541,6 @@ "504465748": "We'll email you a verification link. Click that link and set a new password for your Deriv account.", "506442463": "What is the onboarding procedure?", "506797447": "<0>EUR Basket measures the value of the Euro against a basket of five global currencies (USD, AUD, GBP, JPY, CAD), each weighted by 20%.", - "507838091": "Available on <0>Android, <1>iOS and <2>web browser", "508640915": "Why trade accumulators on Deriv", "509964491": "Trade even when most financial markets are closed", "510416775": "Turbo options allow you to earn a potentially high payout if your market predictions are right and if the spot price does not touch or breach a predetermined barrier.", @@ -572,6 +572,7 @@ "530866080": "What information should I include when making a complaint?", "533462850": "Who is Deriv Prime?", "534798809": "Our intelligent routing to servers worldwide ensures rapid execution speeds and a stable, uninterrupted price feed with 99.97% uptime.", + "535867011": "Sign up in minutes and explore Trader’s Hub — all your trading needs, in one place.", "538228086": "Close-Low", "539261300": "OS icon", "539645627": "We aim to deliver market-leading products that are trusted around the world.", @@ -588,6 +589,7 @@ "550365780": "Open a demo account and practise with an unlimited amount of virtual funds.", "550921370": "No matter if you are large, small, or have just started, Deriv Prime will provide top-of-book liquidity solutions with very fast execution at unmatched fair pricing and conditions.", "551739457": "3. Under CFDs, look for Deriv cTrader and hit Trade.", + "551958626": "Excellent", "552929836": "How does the Reset Call/Reset Put contract type differ from the Rise/Fall contract type?", "554014185": "Online trading is exciting, but it can be addictive. Deriv.com provides you with the opportunity to either self-exclude or set limits on your trading activities on this website.", "554620691": "Please enter a valid number", @@ -595,6 +597,7 @@ "554856552": "To register as a Deriv IB, you must meet the following criteria:", "557095822": "Click the <0>Renew button to renew the service or the <0>Unsubscribe button to cancel the subscription.", "558735677": "Can I open multiple Asians contracts simultaneously?", + "559921804": "<0>You call the stocks. Take a position on your favourite stocks and indices.", "560142031": "Available 24/7, our synthetic indices emulate price movements of real-world markets with varying levels of volatility. As they aren't based on actual underlying assets, they are unaffected by real-world market events. The pricing of our synthetic indices is backed by algorithms that are audited for fairness by an independent third party. Read <0>this article to learn more about trading synthetic indices on Deriv.", "560243784": "Liquidity solutions provider | Deriv Prime", "560338255": "<0>UNG.US The United States Natural Gas Fund ETF tracks in percentage terms the movements of natural gas prices.", @@ -611,7 +614,6 @@ "573384365": "If you are still having issues, please contact our support team via ", "573706432": "Select market to trade", "574805081": "<0>SPXS.US The Direxion Daily S&P 500 Bear 3X Shares ETF seeks to reflect 300% of the inverse of the performance of the S&P 500.", - "575071944": "Awards", "575534504": "Low spreads", "576643640": "

Reset Call/Reset Put contracts offer the ability to reset the strike price at a potentially more advantageous level. In this contract, your market prediction is your contract's exit price against the reset price (instead of the entry price). Reset contract types also typically offer a lower fixed payout percentage compared to Rise/Fall contracts.

Meanwhile, Rise/Fall contracts consider the contract's exit price against the contract's entry price, based on your market prediction.

In both instances, the potential payout is fixed upon entry.

", "576793632": "0 - 15 million <0>(Crypto)", @@ -830,6 +832,7 @@ "775706054": "Do you sell trading bots?", "775826029": "In the Copy tab of your Deriv cTrader account, search for strategy providers. Pick your favourite strategies, allocate funds, and start copy trading.", "777072220": "Click the Buy button to open your trade.", + "777203273": "Trade CFDs, Options, and Multipliers", "778624300": "Take advantage of Deriv's trading calculators that help you to calculate your swap, pip, profit, and losses for the CFD and multiplier trading.", "779522948": "Ipoh | Our office – Malaysia | Deriv", "780041225": "If you already have a demo account, here’s how to add a real account:", @@ -861,10 +864,10 @@ "806165583": "Australia 200", "808426886": "We don’t practise hard-selling, offer financial or trading advice, nor make promises of guaranteed returns. We don’t encourage vulnerable people to trade and implement controls to prevent any unlawful activity.", "809146176": "Not applicable", + "809414451": "<0>Forex at your fingertips. Currency trading with major and minor pairs.", "809480545": "If you'd like to log in using your email address instead, follow these steps:", "809734567": "In the <0>MQL5 signals showcase page, click the Create signal button.", "809743883": "Trading forex pairs on Deriv GO", - "811176466": "Available on <0>Android & <1>web browser", "811665902": "What is Deriv MetaTrader 5 (Deriv MT5)?", "812101045": "Stop loss and/or take profit calculator for margin", "813485850": "Remember the 5 Don'ts:", @@ -903,10 +906,10 @@ "837251632": "Trade global stocks and stock indices now on our Deriv MT5 platform", "837396666": "<0>IEMG.US The iShares Core MSCI Emerging Mkts ETF tracks an index of large-, mid-, and small-capitalisation emerging market equities.", "838017583": "Not all payment methods are available in your country. Kindly check your cashier for further information. Withdrawals may take up to 15 working days to reflect in your bank account.", - "838569559": "Our platforms", "840305493": "Nickel/USD", "841698576": "What are the contract duration ranges for Digits contract types?", "842404857": "One or more disputes were raised against you. Please contact us via <0>live chat for more information.", + "847028103": "Trade diverse vanilla and exotic options across platforms and markets without risking more than your initial stake. ", "847028402": "Check your email", "850220566": "You can trade forex, stock indices, commodities, cryptocurrencies, and derived on Deriv Trader. Some markets may not be available in certain countries.", "850240893": "USD/JPY DFX10 Index", @@ -985,13 +988,13 @@ "910806943": "You’ll earn a fixed commission based on the volume of individual trades bought by your referred clients.", "912406629": "Follow these steps:", "913276286": "1. Go to your <0>Deriv MT5 dashboard.", - "913548355": "Connect with fellow traders and transfer money in minutes.", "913719394": "If you select ‘Over’, you will win the payout if the last digit of the last tick is greater than your prediction.", "915392164": "Open long or short positions based on your predictions of the market price movements.", "915554307": "Your potential. Our technology.", "916591715": "The above information is updated monthly and, therefore, may not reflect current trading conditions.", "917157780": "If you select 'Differs', you receive the payout if the last digit of the exit price is different than your prediction.", "917922170": "- Select the underlying asset you want to trade.", + "918181729": "call to action background", "918587905": "Are you sure you want to delete your account?", "918634571": "When you open a position, barriers are created around the asset’s price. The upper and lower barriers are automatically calculated for every tick based on your chosen asset and accumulator value. If you close your position before either of the barriers is reached, you will make a profit.", "920363635": "Frequently asked questions - IB programme", @@ -1053,7 +1056,6 @@ "974534578": "Asian <0>indices", "974888153": "High-Low", "976566872": "For example, you predict that the market will go up, and buy a contract on Crash 300 index at 8,000 USD.", - "977955517": "Online trading platform | Forex, cryptos, stocks | Deriv", "978785299": "How do I block someone on Deriv P2P?", "980197763": "Swap short (Daily %)", "980696453": "DTrader | Online Trading Platform | Deriv.com", @@ -1080,7 +1082,6 @@ "1010178911": "For more info, contact your country manager.", "1010278278": "Can I delete my Deriv MT5 account history?", "1010645311": "Predict the price movements of commodities like silver, gold, and oil, and use margin to amplify your possible profits.", - "1011699543": "Trade the price movements of natural resources that are central to the world’s economy and make the most of the market action.", "1015371290": "Experienced affiliate managers answer all your queries and provide you with excellent promotional and educational materials.", "1015510435": "BMW", "1019419532": "Vanilla options allow you to express a bullish or bearish view on an underlying asset by purchasing either a Call or a Put option. You can earn a potentially high payout if your predictions are right within a timed contract and based on market conditions.", @@ -1156,7 +1157,6 @@ "1077779258": "General Motors Company", "1078303105": "Stop out", "1079537687": "Biogen Inc", - "1080905136": "opportunities", "1081045854": "If you select 'Even', you receive the payout if the last digit of the exit price is an even number (e.g. 2, 4, 6, 8, 0).", "1081306780": "IIP Platinum Companies", "1081935332": "Currently, you can only buy vanilla call and put options on Deriv.", @@ -1164,6 +1164,7 @@ "1083621931": "Please note that the availability of early exit from your trading position depends on the specific trade type, or it may only be available within a certain timeframe.", "1084407062": "These indices correspond to simulated markets with <0>constant volatilities of 10%, 25%, 50%, 75%, and 100%. There is an equal probability of an up or down jump <0>every 20 minutes, on average. The jump size is <0>around 30 times the normal price movement, on average.", "1084960586": "Disclose the terms of all contracts", + "1086118495": "Traders Hub", "1088428939": "These indices correspond to financial markets with volatilities of 10% and 20%. One tick is generated for every tick of the corresponding forex pair.", "1089110190": "You accidentally gave us another email address (usually a work or a personal one instead of the one you meant).", "1089165018": "Get in touch", @@ -1208,10 +1209,12 @@ "1124905330": "Customise your trade types", "1126492980": "The <0>Buy/Sell tab shows you ads by other advertisers. You can see your ads in the <0>My ads tab.", "1126725671": "A notice to help you understand the risks that might arise when you trade on Deriv", + "1126862566": "See all stocks & indices", "1126917116": "Micro pairs", "1128046384": "No. You can withdraw your commission whenever you want.", "1129126362": "<0> -0.83", "1130568086": "To withdraw funds from your Deriv X account, you’ll first need to transfer the funds to your Deriv account. Go to Cashier, click \"Transfer\", and follow the instructions on the screen.", + "1135622226": "24/7 trading on the price of popular cryptocurrencies.", "1136360582": "In this e-book we will cover", "1136731907": "Note that these are approximate values only and will differ depending on the leverage that is set for your account and the asset you want to trade.", "1138338302": "If you're residing in the EU, <0>contact us via live chat, and we'll help you with it.", @@ -1237,6 +1240,7 @@ "1165952627": "For further information, see Section 4 on Deriv P2P in <0>our terms and conditions.", "1167224712": "We offer various payment methods - Bank wires, debit/credit cards, e-wallets and cryptocurrencies to make your transactions more convenient!", "1168167679": "members", + "1169085723": "Sign up and explore", "1169092422": "Vanilla options", "1169337138": "A chart illustrating a losing Under trade type contract", "1169378202": "Payment agents | Partnership programmes | Deriv", @@ -1315,6 +1319,7 @@ "1230198893": "Deriv’s easy and free setup of DBot trader can automate your trading without writing codes. Create your own bot trader using our tutorials and guides!", "1232451396": "What is a complaint?", "1233175774": "A sub-affiliate generates USD 300 worth of commission. Here is how we calculate their total commissions:", + "1233178579": "Our customers say", "1234764728": "Asset Price is required", "1235997543": "What are the differences between the MT5 Derived, Financial, and Swap-free accounts?", "1236398277": "<0>One tick is generated <0>every second for volatility indices <0>150 (1s), and 250 (1s).", @@ -1357,7 +1362,9 @@ "1275674402": "Go long and short", "1277672291": "Yes, you are allowed to enter multiple High/Low Ticks contracts at the same time.", "1277917401": "If you choose an Only Downs contract, you will win a potential payout if the price only decreases during the selected time period.", + "1278262646": "168M+", "1280161359": "Why copy trade?", + "1280193494": "Mine for commodities.", "1280380287": "Hungary", "1280397222": "Have your own platform (for example, YouTube channel, blog, social media platforms, etc) to promote your link.", "1280750550": "Deriv Investments (Europe) Limited is licensed and regulated by the Malta Financial Services Authority under the Investment Services Act (<0>licence). Deriv (FX) Ltd is licensed by the Labuan Financial Services Authority (<1>licence). Deriv (BVI) Ltd is licensed by the British Virgin Islands Financial Services Commission (<2>licence). Deriv (V) Ltd is licensed by the Vanuatu Financial Services Commission (<3>licence). Deriv (SVG) LLC has a registered office at First Floor, SVG Teachers Credit Union Uptown Building, Corner of James and Middle Street, Kingstown P.O., St Vincent and the Grenadines. The holding company for these subsidiaries is Deriv.com Limited, with the registration number 71479 and the registered address at 2nd Floor, 1 Cornet Street, St Peter Port, Guernsey, GY1 1BZ.", @@ -1393,6 +1400,7 @@ "1304304475": "Scan to download Deriv P2P", "1305441150": "Frequently asked questions - About Deriv", "1307306020": "SmartTrader trading platform", + "1307310424": "Trade CFDs and Options on 1500+ instruments, all in one place with 24/7 trading and 24/7 worldwide support.", "1308171976": "Do I need to pay taxes on my trades/profits?", "1308801287": "Derived FX indices are simulated assets with prices derived from the price movements of real major forex pairs. Our algorithms track real-world currency prices and dampen fluctuations caused by news events and market sentiment. Plus, you can choose to trade them at the volatility you prefer.", "1309138051": "If you continue to do well, you can increase your limit to 10,000 USD for buy and sell orders.", @@ -1427,6 +1435,7 @@ "1345965490": "- lower than the entry price for a Reset Call contract, or", "1346204508": "Take profit", "1349080073": "Please enter only alphabetic characters", + "1349233664": "Ask", "1351421019": "Where can I trade Asian options?", "1353732907": "Refers to the currency pair or other product that can be traded.", "1354275546": "Hassle-free deposits and withdrawals", @@ -1517,7 +1526,6 @@ "1417996846": "Can a premium payment agent provide their services to another premium payment agent?", "1418467036": "Payment agents | Partners | Deriv", "1418674132": "A complaint is defined as a spoken or written expression of your dissatisfaction with the products or services that the Company offers. If you believe these have led to, or may lead to, monetary loss, considerable distress, or significant inconvenience, then your voiced dissatisfaction is considered a complaint.", - "1419977958": "Available on <0>Android, <1>iOS, <2>Mac OS, <3>Windows, <4>Linux and <5>web browser", "1421015099": "Find your role with us by browsing Deriv job opportunities in Reading, UK.", "1421304071": "By joining our affiliate programme, you’ll benefit from:", "1421464735": "You can get more info about this on our <0>Regulatory information page.", @@ -1538,9 +1546,10 @@ "1437672633": "Step 4 : Personal details (4 of 5)", "1438632095": "Please enter a valid company registration number.", "1442199408": "Deriv MT5 trading platform", + "1444503524": "Trade CFDs, options, and multipliers", "1446857185": "
  1. Select the market and asset you want to trade.
  2. Choose which Digits contract to open (Matches/Differs; Even/Odd; Over/Under).
  3. Set your preferred tick duration and last digit prediction.
  4. Enter your stake or desired potential payout amount.
  5. Open your Digits trade.
", "1446914689": "Guernsey alt img", - "1449337630": "countless trading", + "1448921598": "Broker of the year 2023 by FinanceFeeds", "1450233348": "If you haven’t made a deposit or added a real MT5 account, follow these steps:", "1451636739": "Intuitive tools", "1452901553": "Derived trading gives you a chance to make a profit from correctly predicting the price movement of instruments that mimic characteristics of financial markets or are derived from them.", @@ -1561,6 +1570,7 @@ "1466745668": "Predict what number will be the last digit of the last tick of a contract.", "1466788657": "For more info, <0>check out this blog post on the basics of building a trading bot.", "1467325385": "Global affiliate support", + "1467514183": "Virtual markets, real opportunities.", "1468688914": "Make instant deposits using crypto to your fiat account.", "1469255430": "terms and conditions", "1469626982": "USD/CNH", @@ -1584,6 +1594,7 @@ "1488581694": "Ciudad del Este – Our office | Deriv", "1489350747": "To become an IB, you'll need to be an existing affiliate with a Deriv account and an MT5 Synthetic real account. If you do, you can apply to become an IB by writing to us at <0>affiliates@deriv.com. <1>Get more info about our IB programme.", "1489994179": "Find your role with us by browsing Deriv job opportunities in Asunción, Paraguay.", + "1489998906": "Try with zero-risk", "1490099054": "who we are", "1490540125": "How can I automate my trading strategy?", "1490936453": "For your Deriv real account, go to <0>Reports to close or sell your open positions.", @@ -1642,6 +1653,7 @@ "1541818425": "Reset password", "1542038811": "High percentage", "1542393407": "CFD trading features on Deriv", + "1545490823": "User-friendly trading platforms, on any device", "1545962889": "The Master Affiliate Programme is another exciting opportunity where you can benefit from bringing in new affiliates to Deriv. You’ll earn based on the commission of your sub-affiliates.", "1546535785": "Are there any conditions that I should meet before I can withdraw my commission?", "1548745350": "Deriv Prime is the institutional arm of Deriv Group, and staying true to its guiding principles, effectively democratises liquidity provision to financial institutions. No matter if you are large, small, or have just started, Deriv Prime will provide top-of-book liquidity solutions with very fast execution at unmatched fair pricing and conditions.", @@ -1666,6 +1678,7 @@ "1557466457": "Enter stake amount", "1557535154": "Is it free to join your affiliate programme?", "1557977381": "

The potential payout is predetermined based on the specific details of the trade and if your market predictions are right.

For Rise/Fall contracts, potential payouts generally range from 85% to 95% of your stake.

For Higher/Lower contracts, potential payouts can range from 1% to 3,900% of your stake, depending on where the barrier is set.

The potential payout and potential loss (your initial stake) will be clearly displayed before you enter the trade.

", + "1559510375": "Join over 2.5 million online traders", "1559712313": "Commodity trades available on Deriv", "1560383409": "Android", "1561008060": "", @@ -1713,6 +1726,7 @@ "1595387343": "Monitor accounts: Keep a close eye on your accounts for any suspicious activity. This includes checking for unauthorised transactions, changes to account settings, or new login attempts.", "1595539912": "Processing time", "1596747747": "Boom 600 Index ", + "1597270197": "1. Sign up and explore", "1597478217": "No, you cannot close an Asians contract before it expires.", "1598664071": "List of directors", "1599891822": "Stop loss amount in Down direction", @@ -1767,6 +1781,7 @@ "1636527166": "Forex trades available on Deriv", "1636782601": "Multipliers", "1637050346": "Why did my credit card deposit get declined?", + "1637540720": "Most trusted broker APAC 2023 by UF Awards", "1637552314": "Once you are satisfied with the parameters that you have set, select either ‘Up’ or ‘Down’ to purchase your contract. Otherwise, continue to customise the parameters and place your order when you are satisfied with the conditions.", "1637921239": "Go to your Account settings. Click the “Security and safety” drop-down menu, and select “Email and passwords”. Under “Deriv X password”, click “Change password” to reset your password.", "1641578390": "1 }", @@ -1790,6 +1805,7 @@ "1653650288": "Market-based values with limited influence from real-world events", "1654085043": "A chart illustrating a losing Lower trade type contract", "1655763047": "Google", + "1656269279": "See all commodities", "1658508250": "What is the difference between Rise/Fall and Higher/Lower contracts?", "1658594963": "Can I change the tick duration for the High/Low Ticks contract type?", "1659675491": "Practise trading from the mobile app, desktop app, or through your web browser.", @@ -1805,6 +1821,7 @@ "1671799496": "Deriv Prime partners with regulated financial institutions, including:", "1672523550": "Join over 2.5 million traders worldwide", "1672776151": "Claim a FREE e-book now!", + "1673053645": "2. Try with zero-risk", "1673294000": "What is the price barrier in Touch/No Touch contracts?", "1673505406": "An impersonator’s main goal is to steal your sensitive information and funds.", "1673824550": "Minimum stake", @@ -1846,6 +1863,7 @@ "1703673631": "No, you cannot change the tick duration for High/Low Ticks. This contract type is always based on the next 5 price ticks after the contract is open. This is fixed across all instruments that can be traded with this contract type.", "1704208859": "icon", "1704406787": "Choose the block you want and drag it to the workspace.", + "1705748978": "Monthly deals", "1707301172": "Stocks, unlocked", "1708242802": "Use a secure web browser such as Google Chrome. Always install the latest software updates because they include security patches.", "1709273595": "One standard lot of forex = 100,000 units", @@ -1883,7 +1901,6 @@ "1742671486": "Can I select the duration for an Asians contract?", "1743279813": "Why trade with Deriv cTrader", "1743448290": "Payment agents", - "1744637366": "Available on <0>Android and <1>iOS", "1744940662": "Best Forex Broker Latin America", "1745193633": "Redirect notice", "1746051371": "Download the app", @@ -2012,7 +2029,6 @@ "1859772193": "If you select ‘Allow equals’, you win the payout if the exit spot is higher than or equal to the entry spot for ‘Rise’. Similarly, you win the payout if the exit spot is lower than or equal to the entry spot for ‘Fall’.", "1860472068": "Online banking", "1861302455": "You can place an In/Out trade by:", - "1861802946": "Want to trade
Options on the go?", "1862283751": "Trade forex, synthetic indices, and cryptocurrencies wherever, whenever you want and maximise your potential profit with multipliers on Deriv GO.", "1862328242": "success", "1864779741": "Check your accounts: Review all your other online accounts (email, social media, banking, etc.) to ensure they haven't been compromised as well. If you use the same password for multiple accounts, change those passwords too.", @@ -2047,12 +2063,12 @@ "1882011796": "If you don’t ask for a removal of self-exclusion after the expiry, it is not removed automatically.", "1883903201": "In/Out | Digital options contract | Deriv", "1887624510": "Who can apply as a Master Affiliate?", - "1887774290": "Scan to download Deriv GO Ultimate Android APK (Android 5.0 and above)", "1888267724": "Predict whether the market price will be higher or lower than a price target (the barrier) at the end of the contract.", "1889180006": "

No, they are not the same.

When you trade a Higher/Lower contract, you speculate on the price direction of an underlying asset over a time period.

When you trade High/Low Ticks, you predict which tick is the highest within a 5-tick contract.

", "1889326047": "Available as web and mobile apps", "1889877402": "Trade types option duration", "1890149882": "The standardised amount of an asset in one contract.", + "1890987659": "Safe and Secure", "1890990339": "<0>Hong Kong 50 tracks the stock performance of the 50 largest listed companies in Hong Kong.", "1893015908": "Uber Technologies Inc", "1893117061": "The <0>DEX 1500DN has frequent small spikes and occasional major drops, which occur <0>every 1,500 seconds on average.", @@ -2067,7 +2083,6 @@ "1900817499": "Stocks, ETFs, & stock indices", "1902324847": "With these indices, there is an average of one drop (crash) or one spike (boom) in prices that occur in <0>a series of 300 ticks.", "1902398472": "Yes, you can. You will need to notify your account manager if you wish to do so.", - "1903084812": "Choose from {{platform_count}} powerful platforms — designed with you in mind", "1903393516": "Our Deriv support community can help you find answers.", "1903495030": "For synthetic accounts, the stop loss and/or take profit pip value is in USD.", "1903577078": "The <0>DSI20 switches between regimes every <1>20 minutes on average.", @@ -2104,8 +2119,8 @@ "1922529883": "Boom 1000 Index", "1923530212": "Flexible.", "1923836405": "Must be exactly 8 characters", - "1923984982": "Flagship options, accumulators, & multipliers trading platform.", "1924997360": "[ { 10", + "1925182739": "Bid", "1925717346": "The point value is derivied from the current digits of the asset. In this example, the digit is 5, so the point value is 0.00001.", "1926519171": "Limit the amount of money you may trade within a specified period.", "1928776934": "Active traders", @@ -2157,10 +2172,12 @@ "1969128618": "Manage an active online community that’s passionate about online trading, investing, or personal finance.", "1970155983": "regulatory information", "1971270452": "Powerful, intuitive platforms", + "1972080072": "We’re regulated and licensed by global financial authorities.", "1975052344": "Why traders choose vanilla options", "1975258895": "VOO.US", "1976014299": "For <0>oil, a deal for 10 lots for a price of USD 96 will pay out USD 0.05 in commission based on the following formula:", "1976889936": "Yes, you can select the duration of your Touch/No Touch contract. You can choose to open a contract for as short as 5 ticks to as long as 365 days (depending on the trading asset selected).", + "1977907302": "Dependable", "1978148367": "Open a real account, make a deposit, and start trading for real. Trade forex, indices, commodities, and more.", "1979503547": "Trading terms", "1980724783": "The point value is derived from the current digits of the asset. In this example, the digit is 5, so the point value is 0.00001.", @@ -2180,6 +2197,7 @@ "1991524207": "Jump 100 Index", "1991711258": "LNK/USD", "1992041985": "Why have my ads disappeared from the My ads page?", + "1993204913": "Social", "1994023526": "The email address you entered had a mistake or typo (happens to the best of us).", "1994248927": "Download Deriv P2P.", "1994533632": "Click on the block you want to remove and press <0>Delete on your keyboard.", @@ -2188,8 +2206,10 @@ "1996332377": "1 ) }", "1997138507": "If the last tick is equal to the average of the ticks, you don't win the payout.", "1997358332": "download deriv-go", + "1998203837": "Safe and secure", "1998452473": "Earn up to 45% lifetime commission with an online trading provider that enables anyone to trade on several popular financial markets with the utmost convenience. Deriv Group Ltd — the owner of Deriv.com — has a proven track record of running successful referral programmes with prompt payouts.", "1999120464": "Forex (Minor)", + "1999511199": "Users worldwide", "2000568638": "World markets including precious metals and energies.", "2000965959": "Trading hours", "2002128854": "

No, early exits are not available for Reset Call/Reset Put contracts.

Please note that the availability of early exit from your trading position depends on the specific trade type, or it may only be available within a certain timeframe.

", @@ -2202,7 +2222,6 @@ "2006350986": "Some causes that can compromise your account are if you:", "2006812563": "Predict whether the exit price will end inside or outside two barrier levels at the end of the contract.", "2006998561": "DEX 1500UP", - "2007092908": "Trade with leverage and low spreads for better returns on successful trades.", "2009954464": "<0>VNQ.US The Vanguard Real Estate ETF tracks the return of the MSCI US Investable Market Real Estate 25/50 Index.", "2010015270": "Why choose Deriv Prime?", "2010532749": "In your affiliate dashboard, go to “Reports” and click on “Detailed activity report”.", @@ -2233,6 +2252,7 @@ "2035670983": "Fewer distractions", "2036526456": "Learn more about our payment methods and how to use them.", "2036671182": "If you select 'Over', you receive the payout if the last digit of the exit price is greater than your prediction.", + "2036876215": "<0>Forex at your fingertips. Currency trading with major, minor, and exotic pairs. ", "2041571225": "- Brokerage firms", "2041763181": "Once we've paid your commission into your account, you can withdraw whenever you want.", "2042720038": "High Ticks/Low Ticks, Asians, Reset Call/Reset Put, Digits, and Only Ups/Only Downs are available exclusively on synthetics.", @@ -2269,13 +2289,11 @@ "2064273783": "Cashier limits", "2064293002": "You can’t set a take profit level when you purchase a multipliers contract with deal cancellation. However, once the deal cancellation expires, you can set a take profit level on the open contract.", "2065278286": "Spread", - "2067757832": "Derived Indices", "2068595952": "What is derived?", "2069255870": "Will Deriv compensate for my loss if my account falls under a scamming/phishing trap?", "2069455291": "Date of Birth*", "2069660515": "Postal/Zip code*", "2070356006": "Start earning based on your chosen commission plan –– up to 45% of the total net revenue generated by your referred clients.", - "2070897729": "Trade CFDs on forex, commodities, cryptocurrencies, stocks, stock indices, and derived indices.", "2071458958": "The minimum volume for micro forex pairs is 0.1 lot.", "2071562301": "Singapore – Our office | Deriv", "2071797823": "If the selected condition is not met including if the tick is equal to any of the previous ticks, your stake is lost.", @@ -2289,6 +2307,7 @@ "2079084552": "Deriv (BVI) Limited (Company No. 1841206), incorporated on the 15th September 2014, is registered in the British Virgin Islands with its registered office located at Kingston Chambers, P.O. Box 173, Road Town, Tortola British Virgin Islands. Deriv (BVI) Ltd is licensed by the British Virgin Islands Financial Services Commission <0>(view licence).", "2080629326": "Select your XML file and hit <0>Open.", "2080773053": "Available instruments", + "2081422825": "Fast, hassle-free deposits and withdrawals", "2083818875": "<0>SLV.US The iShares Silver Trust ETF seeks to reflect generally the performance of the price of silver.", "2086048243": "Certificate of incorporation", "2087247269": "Not at all. Joining our payment agent programme is completely free.", @@ -2330,6 +2349,7 @@ "2121790637": "How to buy your first multipliers contract on Deriv Trader", "2123318546": "RTS28 2021", "2124129338": "Deriv - An online trading platform that offers a wide selection of derivatives to trade on", + "2125222257": "Trade forex, stocks, crypto, gold & commodities | Deriv", "2126425899": "Adidas Salomon", "2127031078": "Available to trade 24/7 on popular crypto assets", "2127438954": "For synthetic, the swap charge is calculated on an annual basis for long and short positions based on this formula:", @@ -2400,16 +2420,6 @@ "-797743726": "Open an account now and gain access to the world of trading. No need to wait — you can begin trading in minutes.", "-1318406909": "Deposit as little as 5 USD to start trading and customise your trades to suit your strategy.", "-354212645": "Return to homepage", - "-1382581758": "My experience so far is just awesome! You can do instant buying and selling, and I hope to continue enjoying using Deriv P2P. Keep up the good work!", - "-459332544": "I have never seen a platform that is so flexible with multiple resources that meet everyone’s needs. If that’s not enough, Deriv is second to none on customer support services!", - "-2033498676": "Deriv has multiple withdrawal methods, including Deriv P2P, which is fast and convenient. Their support team is available any time and responds very quickly to any queries.", - "-1810714093": "Deriv GO is a very nice app – payments have been swift and easy. I would highly recommend it.", - "-1426812612": "Deriv is the most reliable broker - excellent customer support and fast payments. It’s a great platform for commodities, forex, and synthetics trading.", - "-1019430823": "Low spreads on Synthetics and fast withdrawals - Deriv is a good broker!", - "-935743086": "Wow! Deriv GO is so perfect, it's convenient and reliable. I highly recommend using the app.", - "-1206803300": "I've been a trader for many years, and I've never encountered a good broker like Deriv before – it's the best for customer care and payment options!", - "-13898976": "It's been a really great experience trading forex on Deriv - it's a smooth and seamless operation!", - "-143741607": "Deriv is the best forex broker I have ever come across!", "-1355865870": "Accumulator options are currently offered on volatility indices under derived indices.", "-1804143171": "Not at the moment. You can only open one contract per instrument at a time.", "-1029770383": "No, the growth rate can only be set before opening the contract. Once you open the contract, the growth rate cannot be changed.", @@ -3183,6 +3193,8 @@ "-1179918966": "Browser Update Alert", "-684271315": "OK", "-1809314981": "Other markets you might be interested in", + "-1255879419": "Trader's Hub", + "-1124845179": "Open demo account", "-696867299": "Get trading", "-943701585": "Available on", "-1022786491": "chevron", @@ -3207,11 +3219,11 @@ "-591857861": "The most popular and comprehensive CFDs platform.", "-2055020841": "User-friendly and customisable CFDs platform.", "-1123792363": "Options trading platform with easy navigation.", + "-1257673856": "Flagship options, accumulators, and multipliers trading platform.", "-1098228973": "Major, minor, and exotic currency pairs.", "-1120049888": "Leading company stocks and top global indices.", "-1960027144": "Diverse exchange-traded funds for broad market exposure.", "-1939560439": "Traders' tools", - "-1124845179": "Open demo account", "-1154249172": "Deriv API", "-373212993": "Deriv website", "-1151648694": "Google account sign in page", @@ -3290,25 +3302,45 @@ "-1924237321": "Copy trading", "-155069162": "Ctrader copy trading", "-356516643": "Practise with a demo account preloaded with unlimited virtual funds.", - "-1486813632": "Rated excellent on", - "-967353831": "You need Deriv GO Ultimate for Android. Trade Options, in addition to CFDs and Multipliers, on your favourite markets.", - "-1638607416": "Download now >", - "-1026502273": "One broker,", - "-1981735781": "One broker, countless trading opportunities", + "-59312670": "10+ global payment methods. Deposit instantly starting from just USD 10. Withdraw in minutes.*", + "-237235710": "* Availability of payment methods and processing speeds may vary based on location and selected payment option.", + "-1753424574": "Best forex spreads APAC 2023 by UF Awards", + "-1512513959": "Trade CFDs and multipliers on global financial markets, all in one place with 24/7 trading and worldwide support.", + "-63683480": "Trade CFDs and options on global financial markets, all in one place with 24/7 trading and worldwide support.", + "-573436898": "Trading for anyone. Anywhere. Anytime.", + "-137444201": "Buy", + "-1971867782": "See all forex pairs", + "-1342250828": "<0>Virtual markets, real opportunities. Trade simulated markets, as volatile as you like.", + "-1604719817": "See all derived indices", + "-847082462": "<0>Diversify with ETFs. Trade a theme, strategy, or objective through ETFs.", + "-495142519": "See all ETFs", + "-1997639312": "<0>Ride the crypto waves. 24/7 trading on the price of popular cryptocurrencies.", + "-989885046": "See all cryptocurrencies", + "-2118030379": "<0>Mine for commodities. Trade the price of precious metals and oil.", "-1722031734": "Check trading specs", "-61718257": "Speculate on the price movements of popular exchange-traded funds (ETFs). Diversify your portfolio with assets that track bonds, commodities, and indices, without the high cost of owning the underlying assets.", "-777850431": "View all >", "-1384760133": "Bid price", "-1882694284": "Ask price", "-1293060532": "Daily % change", - "-1360155081": "Take part in the world’s largest financial market where more than $5 trillion worth of currencies are bought and sold each day.", - "-1235219375": "Trade share price movements of big brands and predict broader market trends with indices that measure the overall performance of a market.", - "-295883723": "Trade on the rising and falling prices of the most popular cryptocurrencies without the need to own a digital wallet.", - "-1157215583": "Our classic bot builder and automated trading platform.", - "-1433647473": "Choose from {{platform_count}} powerful platforms — each designed with your needs in mind.", - "-816866824": "Scan to download deriv P2P", - "-1016982945": "Earn a range of payouts by correctly predicting market movements.", - "-502915460": "Multiply your potential profit without risking more than your stake.", + "-626244619": "Try any trade, on any platform with a zero-risk, demo trading account.", + "-230284900": "3. Trade with confidence", + "-1936142548": "Fund your account and start trading with round-the-clock support.", + "-1373001377": "Trade with confidence", + "-354246493": "Start trading in 3 simple steps", + "-1896639903": "$650B+", + "-1921087985": "Monthly volume", + "-1330380888": "Established since", + "-1692319801": "Trade with leverage, unbeatable spreads, and fast execution on the widest range of markets.", + "-711756091": "Trade CFDs and multipliers", + "-766186087": "{{trustScore}} out of 5 based on {{numberOfReviews}} reviews", + "-779264061": "Bots", + "-954684507": "The most popular and comprehensive <0>CFDs platform.", + "-895675910": "Flagship trading platform for <0>multipliers.", + "-1590626999": "Our 99.97% uptime ensures your uninterrupted access to the markets.", + "-374485603": "Regulated", + "-1615451408": "Our professional multilingual team is here for you anytime.", + "-441234786": "We're 25 years strong", "-1863708031": "Exchange-traded funds (ETFs) allow you to diversify your portfolio with assets that track bonds, commodities, and indices, without the high cost of owning the underlying assets.", "-1542166394": "<0>AGG.US The iShares Core US Aggregate Bond ETF tracks an index of US investment-grade bonds.", "-1968382000": "<0>ARKK.US The ARK Innovation ETF invests in domestic and foreign equity securities of companies that rely on or benefit from developments in artificial intelligence, automation, DNA technologies, energy storage, fintech, and robotics.", @@ -3406,6 +3438,34 @@ "-1920558726": "Reliable access to deep market liquidity pools", "-102338874": "Fast execution with intelligent order routing", "-763839364": "Dedicated support for smooth operations", + "-1807088090": "Settle all contracts fairly, accurately, and promptly", + "-666356424": "We will design our cashier systems to work as seamlessly as possible, processing deposits and withdrawals efficiently and promptly. As far as possible, we will minimise delays imposed by any AML or anti-fraud requirements.", + "-1096649509": "Provide reliable online trading with high uptime, good security, and low latency", + "-1847094306": "Provide helpful customer support to all customers", + "-1244412808": "Treat all customers equitably", + "-1447821734": "We will treat all customers equally, regardless of where they’re from or the size of their accounts.", + "-688825946": "Handle all complaints with integrity", + "-826237637": "In the event of any complaint, we aim to resolve the issue with speed and integrity.", + "-1881644246": "If a customer is fairly entitled to winnings or balances, and there are no fraud concerns or AML requirements, they should be able to withdraw those funds at will.", + "-539702624": "We will use straightforward language in all our products, services, and communications.", + "-976431156": "Prominently and intelligibly disclose the risks involved in trading", + "-1181926649": "We will be transparent about all the risks involved in trading because we want our customers to make informed choices according to their risk appetite.", + "-217281793": "We will be transparent about how we make money, including when we are a trade counterparty or acting as a broker.", + "-353585365": "We will be honest in our advertising. We will not use implausible images of financial success in our marketing materials.", + "-1617890467": "No financial or trading advice", + "-709676773": "We will not give any opinion on market direction or the suitability of any particular trade.", + "-356979088": "No promises of guaranteed returns", + "-1516665514": "We will not imply that trading solves one’s financial worries or can generate a reliable income. We will be clear that there are no guaranteed or risk-free returns from trading.", + "-1356010780": "Implement policies to prevent vulnerable persons from trading", + "-1186213423": "We will refuse underage persons’ access and implement processes to identify customers who are trading beyond their financial capacity.", + "-220003669": "We will implement know-your-customer (KYC) controls and prevent money laundering and other unlawful activities on our platforms.", + "-1339404877": "Be reliable", + "-1849043145": "We provide secure and robust systems so you can trade with confidence. Whether settling contracts promptly, processing transactions efficiently, or offering responsive 24/7 customer support, we strive to be reliable at every step of your trading experience.", + "-1972583435": "Be fair", + "-781301270": "We champion equal treatment for everyone, which is why we're dedicated to providing transparent and unbiased services. We’re here to resolve your concerns with integrity and provide competitive prices with no hidden fees or access restrictions.", + "-955173076": "We provide clear, accessible information about our platforms and processes so we can build trust and strong client relationships. Through detailed product descriptions and open communication, we aim to make it easier for you to make informed trading decisions.", + "-2032112598": "Be responsible", + "-35673135": "We build our services and platforms on a foundation of trust, honesty, and ethical practices. By proactively implementing policies and controls to prevent unlawful activities, we ensure a fair and secure environment for our trading community.", "-2125275828": "Unique trade types. Hundreds of instruments. Financial and derived markets.", "-154889447": "Ready to join over 2.5 million traders who have chosen Deriv as their trusted broker? Enter your email address to create a free demo account.", "-323355149": "deriv careers", @@ -3631,12 +3691,35 @@ "-1618901770": "Help centre | Frequently asked questions | Trading | Deriv", "-2085755369": "Frequently asked questions - Trading", "-542307428": "world map", + "-1360155081": "Take part in the world’s largest financial market where more than $5 trillion worth of currencies are bought and sold each day.", "-1894673375": "mobile app deriv go", "-505163259": "laptop dtrader", "-1633415532": "laptop deriv x", "-404595524": "laptop dmt5 eu", "-313388618": "Dtrader trading platform at Deriv", + "-717865028": "Anywhere. Anytime.", + "-1708710909": "We’re 25 years strong", + "-1649102304": "Forex at your fingertips.", + "-848499358": "Currency trading with major, minor, and exotic pairs.", + "-116074125": "Trade simulated markets, as volatile as you like.", + "-618346971": "Take a position on your favourite stocks and indices.", + "-984581646": "Trade the price of precious metals and oil.", + "-1107962717": "Ride the crypto waves.", + "-1850916180": "See all cryptocurrencie", + "-822916094": "Sign up in minutes and explore Trader’s Hub — all your trading needs, in one place. ", + "-179708159": "Trade CFDs & Multipliers", + "-1382581758": "My experience so far is just awesome! You can do instant buying and selling, and I hope to continue enjoying using Deriv P2P. Keep up the good work!", + "-459332544": "I have never seen a platform that is so flexible with multiple resources that meet everyone’s needs. If that’s not enough, Deriv is second to none on customer support services!", + "-2033498676": "Deriv has multiple withdrawal methods, including Deriv P2P, which is fast and convenient. Their support team is available any time and responds very quickly to any queries.", + "-1810714093": "Deriv GO is a very nice app – payments have been swift and easy. I would highly recommend it.", + "-1426812612": "Deriv is the most reliable broker - excellent customer support and fast payments. It’s a great platform for commodities, forex, and synthetics trading.", + "-1019430823": "Low spreads on Synthetics and fast withdrawals - Deriv is a good broker!", + "-935743086": "Wow! Deriv GO is so perfect, it's convenient and reliable. I highly recommend using the app.", + "-1206803300": "I've been a trader for many years, and I've never encountered a good broker like Deriv before – it's the best for customer care and payment options!", + "-13898976": "It's been a really great experience trading forex on Deriv - it's a smooth and seamless operation!", + "-143741607": "Deriv is the best forex broker I have ever come across!", "-642822922": "What our clients say about Deriv", + "-2102582479": "Award-winning online broker, rated excellent on Trustpilot. Sign up for a demo trading account to trade forex, stocks, and other financial markets.", "-97177023": "Trade 24/7 on forex, stocks, synthetic indices, and commodities", "-988523882": "DMT5", "-973175694": "email address", @@ -3963,31 +4046,7 @@ "-1095901299": "Stock market | Indices trading | Deriv", "-506783240": "Trade on asset prices derived from simulated markets. Manage your exposure by selecting the volatility level to suit your risk appetite.", "-917592239": "Synthetic indices | Volatility indices | Deriv", - "-1339404877": "Be reliable", - "-1807088090": "Settle all contracts fairly, accurately, and promptly", - "-666356424": "We will design our cashier systems to work as seamlessly as possible, processing deposits and withdrawals efficiently and promptly. As far as possible, we will minimise delays imposed by any AML or anti-fraud requirements.", - "-1096649509": "Provide reliable online trading with high uptime, good security, and low latency", - "-1847094306": "Provide helpful customer support to all customers", - "-1972583435": "Be fair", - "-1244412808": "Treat all customers equitably", - "-1447821734": "We will treat all customers equally, regardless of where they’re from or the size of their accounts.", - "-688825946": "Handle all complaints with integrity", - "-826237637": "In the event of any complaint, we aim to resolve the issue with speed and integrity.", "-1306637437": "We aim to be competitive on pricing for all our products and services.", - "-1881644246": "If a customer is fairly entitled to winnings or balances, and there are no fraud concerns or AML requirements, they should be able to withdraw those funds at will.", - "-539702624": "We will use straightforward language in all our products, services, and communications.", - "-976431156": "Prominently and intelligibly disclose the risks involved in trading", - "-1181926649": "We will be transparent about all the risks involved in trading because we want our customers to make informed choices according to their risk appetite.", - "-217281793": "We will be transparent about how we make money, including when we are a trade counterparty or acting as a broker.", - "-2032112598": "Be responsible", - "-353585365": "We will be honest in our advertising. We will not use implausible images of financial success in our marketing materials.", - "-1617890467": "No financial or trading advice", - "-709676773": "We will not give any opinion on market direction or the suitability of any particular trade.", - "-356979088": "No promises of guaranteed returns", - "-1516665514": "We will not imply that trading solves one’s financial worries or can generate a reliable income. We will be clear that there are no guaranteed or risk-free returns from trading.", - "-1356010780": "Implement policies to prevent vulnerable persons from trading", - "-1186213423": "We will refuse underage persons’ access and implement processes to identify customers who are trading beyond their financial capacity.", - "-220003669": "We will implement know-your-customer (KYC) controls and prevent money laundering and other unlawful activities on our platforms.", "-223886724": "Our principles", "-586716383": "Our principles | Deriv", "-141169956": "Deriv P2P – peer-to-peer deposit and withdrawal service", @@ -4616,7 +4675,6 @@ "-1145023404": "<0>280,000", "-195404006": "Take profit pip value", "-1659122470": "Our profit and loss calculator for margin helps you to approximate your losses and/or gains.", - "-137444201": "Buy", "-213618448": "Stop loss pips", "-544680075": "Take profit pips", "-805098509": "Open price of asset", diff --git a/gatsby-browser.js b/gatsby-browser.js index 2a4e02c896b..07668b75118 100644 --- a/gatsby-browser.js +++ b/gatsby-browser.js @@ -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' diff --git a/gatsby-node.js b/gatsby-node.js index 94220e8c1e1..d11c51f8a34 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -3,15 +3,43 @@ 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 webpack = require('webpack') const StylelintPlugin = require('stylelint-webpack-plugin') const TerserPlugin = require('terser-webpack-plugin') const translations_cache = {} +function OSFunction() { + this.execCommand = function (cmd, callback) { + exec(cmd, (error, stdout) => { + if (error) { + console.error(`exec error: ${error}`) + return + } + + callback(stdout) + }) + } +} + +const fetchTrustpilotData = () => { + // Trustpilot on-build data fetching + const os = new OSFunction() + + os.execCommand('node scripts/trustpilot.js', (returnvalue) => { + console.log(returnvalue) + }) +} + 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) => { diff --git a/package-lock.json b/package-lock.json index 7746c492d52..3d8f2b60df1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,13 +12,13 @@ "@artsy/fresnel": "^6.2.1", "@builder.io/partytown": "^0.8.1", "@deriv-com/analytics": "^1.4.10", - "@deriv-com/blocks": "^0.80.0", - "@deriv-com/components": "^0.49.0", + "@deriv-com/blocks": "^0.87.0", + "@deriv-com/components": "^0.52.0", "@deriv-com/hooks": "^0.11.0", "@deriv-com/providers": "^0.12.0", "@deriv/deriv-api": "^1.0.13", - "@deriv/quill-design": "^1.3.2", - "@deriv/quill-icons": "^1.16.1", + "@deriv/quill-design": "^1.2.16", + "@deriv/quill-icons": "^1.17.3", "@hookform/resolvers": "^3.3.2", "@livechat/customer-sdk": "^3.1.5", "@loadable/component": "^5.15.3", @@ -69,7 +69,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", @@ -163,7 +163,7 @@ "npm": ">=8.19.2" }, "optionalDependencies": { - "@parcel/watcher-linux-x64-glibc": "2.4.0" + "@parcel/watcher-linux-x64-glibc": "^2.4.0" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -429,8 +429,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.22.9", - "license": "MIT", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz", + "integrity": "sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==", "engines": { "node": ">=6.9.0" } @@ -523,9 +524,9 @@ "version": "7.22.15", "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.22.9", - "@babel/helper-validator-option": "^7.22.15", - "browserslist": "^4.21.9", + "@babel/compat-data": "^7.23.5", + "@babel/helper-validator-option": "^7.23.5", + "browserslist": "^4.22.2", "lru-cache": "^5.1.1", "semver": "^6.3.1" }, @@ -740,8 +741,9 @@ } }, "node_modules/@babel/helper-validator-option": { - "version": "7.22.15", - "license": "MIT", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", + "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", "engines": { "node": ">=6.9.0" } @@ -1465,7 +1467,8 @@ "version": "7.22.15", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -2803,14 +2806,14 @@ } }, "node_modules/@deriv-com/blocks": { - "version": "0.80.0", - "resolved": "https://registry.npmjs.org/@deriv-com/blocks/-/blocks-0.80.0.tgz", - "integrity": "sha512-9h0XAv+T8iDLVUoxWlcZ4vX3YfzkGUrvq501OBlzqwszWDVYozQ3PvUz3bKUprL6VBM9scbAXAU6ZFrUOuFqUQ==" + "version": "0.87.0", + "resolved": "https://registry.npmjs.org/@deriv-com/blocks/-/blocks-0.87.0.tgz", + "integrity": "sha512-8iUTGF+TrCGxExbxVgzAIob3Hx9rrVmONGQacVstNNk+FgJ97z2m8ItUxg0JdN5dPLMLqUUzXs+d/VkKPIkngA==" }, "node_modules/@deriv-com/components": { - "version": "0.49.0", - "resolved": "https://registry.npmjs.org/@deriv-com/components/-/components-0.49.0.tgz", - "integrity": "sha512-mJi3x33l+/PrwxiP2CVFNftpiTsWgPpoOmu2cfDheqxJUuOdGECQWWuIzD2NSORp2fZBG116QJYngzvxVQJlLA==" + "version": "0.52.0", + "resolved": "https://registry.npmjs.org/@deriv-com/components/-/components-0.52.0.tgz", + "integrity": "sha512-dF06DzqmHXpvrbZD3gac6mUI5knibPzGPMksziSEvjs8xD25YrWAZfACDqNErGUsmuPyMBcWigjLXzG0fsrJnA==" }, "node_modules/@deriv-com/hooks": { "version": "0.11.0", @@ -2851,11 +2854,11 @@ "license": "0BSD" }, "node_modules/@deriv/quill-design": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@deriv/quill-design/-/quill-design-1.3.2.tgz", - "integrity": "sha512-YTM2jS0EJ6QaruciFX/yYFK50KbmYpWK+WwZRGgZnRuhCJD9pXcsAtQEjMHFRFUFUC3sEvB5wR4cPt5VUW0xAw==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@deriv/quill-design/-/quill-design-1.2.16.tgz", + "integrity": "sha512-WRhg+jynUfraHLoHobDzPmYWJ5aEsz3oDR0GAzyi89aUjFRu7IB2FtLW1aYXBOkwN+JQ63CXPxi6kPHN2gbpWQ==", "peerDependencies": { - "@deriv/quill-icons": "^1.1.3", + "@deriv/quill-icons": "^1.0.10", "@headlessui/react": "^1.7.17", "@types/react": "^17.x || ^18.x", "@use-gesture/react": "^10.3.0", @@ -2867,9 +2870,9 @@ } }, "node_modules/@deriv/quill-icons": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/@deriv/quill-icons/-/quill-icons-1.16.1.tgz", - "integrity": "sha512-jdWsUEgGZ2LBT45F+LE7gLEn9DpNjb0Qn7T26w0hckYCveKnQRWi0jL4ClU4nI72x9dTfht99CKUDboOe4xtPg==", + "version": "1.17.3", + "resolved": "https://registry.npmjs.org/@deriv/quill-icons/-/quill-icons-1.17.3.tgz", + "integrity": "sha512-hiDRqzWL1/VfQes2aEkFrShAa4RudlqDs6Cyp6mGnGTy4azbq6yZro91eQNDN2HC+Sp/zywjHVc7+OZaEl0ZmA==", "peerDependencies": { "react": ">= 16", "react-dom": ">= 16" @@ -16189,6 +16192,30 @@ "version": "14.18.33", "license": "MIT" }, + "node_modules/@vercel/node/node_modules/acorn": { + "version": "8.11.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", + "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/@vercel/node/node_modules/acorn-walk": { + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.1.tgz", + "integrity": "sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/@vercel/node/node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" + }, "node_modules/@vercel/node/node_modules/esbuild": { "version": "0.14.47", "hasInstallScript": true, @@ -16244,6 +16271,48 @@ "version": "0.0.3", "license": "MIT" }, + "node_modules/@vercel/node/node_modules/ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, "node_modules/@vercel/node/node_modules/typescript": { "version": "4.3.4", "license": "Apache-2.0", @@ -18218,6 +18287,17 @@ "node": ">8.0.0" } }, + "node_modules/better-opn/node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/better-opn/node_modules/open": { "version": "7.4.2", "license": "MIT", @@ -28340,7 +28420,16 @@ "url": "https://opencollective.com/html-webpack-plugin" }, "peerDependencies": { + "@rspack/core": "0.x || 1.x", "webpack": "^5.20.0" + }, + "peerDependenciesMeta": { + "@rspack/core": { + "optional": true + }, + "webpack": { + "optional": true + } } }, "node_modules/html-webpack-plugin/node_modules/pretty-error": { @@ -29677,16 +29766,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/is-wsl": { - "version": "2.2.0", - "license": "MIT", - "dependencies": { - "is-docker": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/is64bit": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is64bit/-/is64bit-2.0.0.tgz", @@ -33653,15 +33732,6 @@ "source-map": "~0.6.0" } }, - "node_modules/less/node_modules/debug": { - "version": "3.2.7", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "ms": "^2.1.1" - } - }, "node_modules/less/node_modules/iconv-lite": { "version": "0.6.3", "dev": true, @@ -33692,7 +33762,6 @@ "license": "MIT", "optional": true, "dependencies": { - "debug": "^3.2.6", "iconv-lite": "^0.6.3", "sax": "^1.2.4" }, @@ -38743,6 +38812,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/open/node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/opener": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", @@ -45715,6 +45795,7 @@ }, "node_modules/ts-node": { "version": "10.9.1", + "dev": true, "license": "MIT", "dependencies": { "@cspotcode/source-map-support": "^0.8.0", @@ -45756,6 +45837,7 @@ }, "node_modules/ts-node/node_modules/acorn": { "version": "8.10.0", + "dev": true, "license": "MIT", "bin": { "acorn": "bin/acorn" @@ -45766,6 +45848,7 @@ }, "node_modules/ts-node/node_modules/acorn-walk": { "version": "8.2.0", + "dev": true, "license": "MIT", "engines": { "node": ">=0.4.0" @@ -45773,6 +45856,7 @@ }, "node_modules/ts-node/node_modules/arg": { "version": "4.1.3", + "dev": true, "license": "MIT" }, "node_modules/ts-pnp": { diff --git a/package.json b/package.json index b30fa9fd7d9..cba2dd03060 100644 --- a/package.json +++ b/package.json @@ -7,13 +7,13 @@ "@artsy/fresnel": "^6.2.1", "@builder.io/partytown": "^0.8.1", "@deriv-com/analytics": "^1.4.10", - "@deriv-com/blocks": "^0.80.0", - "@deriv-com/components": "^0.49.0", + "@deriv-com/blocks": "^0.87.0", + "@deriv-com/components": "^0.52.0", "@deriv-com/hooks": "^0.11.0", "@deriv-com/providers": "^0.12.0", "@deriv/deriv-api": "^1.0.13", - "@deriv/quill-design": "^1.3.2", - "@deriv/quill-icons": "^1.16.1", + "@deriv/quill-design": "^1.2.16", + "@deriv/quill-icons": "^1.17.3", "@hookform/resolvers": "^3.3.2", "@livechat/customer-sdk": "^3.1.5", "@loadable/component": "^5.15.3", @@ -64,7 +64,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", @@ -154,7 +154,7 @@ "typescript-plugin-css-modules": "^4.2.3" }, "optionalDependencies": { - "@parcel/watcher-linux-x64-glibc": "2.4.0" + "@parcel/watcher-linux-x64-glibc": "^2.4.0" }, "keywords": [ "deriv", @@ -163,8 +163,10 @@ "license": "Apache License 2.0", "scripts": { "analyze-bundle": "GENERATE_JSON_STATS=true gatsby build && npx webpack-bundle-analyzer -m static -r ./webpack-bundle-report/report.html ./public/stats.json", + "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", "build": "GATSBY_CPU_COUNT=2 gatsby build --log-pages && node scripts/copy-htaccess.js", - "update:deriv-com-libs": "npm i @deriv-com/blocks@latest @deriv-com/components@latest @deriv-com/hooks@latest @deriv-com/providers@latest", "partytown": "partytown copylib public/~partytown", "develop": "GATSBY_CPU_COUNT=2 gatsby develop -o", "format": "prettier --write '**/*.js' '*.js'", diff --git a/scripts/trustpilot.js b/scripts/trustpilot.js new file mode 100644 index 00000000000..ce9ebb4c9a3 --- /dev/null +++ b/scripts/trustpilot.js @@ -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( + `\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); + } + + fs.readFile(filePath, 'utf8', (err, data) => { + if (err) { + console.error(`Error reading the file: ${err}`); + return; + } + + try { + const jsonData = JSON.parse(data); + console.log('Trust Pilot Data:', jsonData); + } catch (error) { + console.error(`Error parsing JSON: ${error}`); + } + }); + }); + + } catch (error) { + console.log(error) + } +} + +fetchTrustpilotData() + diff --git a/src/data/trustpilot.json b/src/data/trustpilot.json new file mode 100644 index 00000000000..fd1aeaabad8 --- /dev/null +++ b/src/data/trustpilot.json @@ -0,0 +1,5 @@ +{ + "stars": 4.5, + "trustScore": 4.6, + "numberOfReviews": "43,385" +} diff --git a/src/features/components/atoms/accordion/accordion-item/index.tsx b/src/features/components/atoms/accordion/accordion-item/index.tsx index 1e4525a013c..2877090934a 100644 --- a/src/features/components/atoms/accordion/accordion-item/index.tsx +++ b/src/features/components/atoms/accordion/accordion-item/index.tsx @@ -29,21 +29,21 @@ const icons: AccordionIcons = { const AccordionItem = React.forwardRef( ({ children, className, item_title, icon_type = 'chevron', ...props }, ref) => ( - + - + - +
{children}
diff --git a/src/features/components/atoms/accordion/accordion-root/index.tsx b/src/features/components/atoms/accordion/accordion-root/index.tsx index 5aeff879560..1369b491e98 100644 --- a/src/features/components/atoms/accordion/accordion-root/index.tsx +++ b/src/features/components/atoms/accordion/accordion-root/index.tsx @@ -9,7 +9,7 @@ const AccordionRoot = React.forwardRef< >(({ className, ...rest }, ref) => { return ( diff --git a/src/features/components/atoms/accordion/accordion-shadow-item/index.tsx b/src/features/components/atoms/accordion/accordion-shadow-item/index.tsx index 3bac18326b6..52f1b8fc5e1 100644 --- a/src/features/components/atoms/accordion/accordion-shadow-item/index.tsx +++ b/src/features/components/atoms/accordion/accordion-shadow-item/index.tsx @@ -16,14 +16,18 @@ interface TAccordionItem extends AccordionItemProps { const AccordionShadowItem = React.forwardRef( ({ children, className, renderHeader, item_title, icon_type = 'chevron', ...props }, ref) => ( - + {renderHeader ? ( @@ -36,17 +40,20 @@ const AccordionShadowItem = React.forwardRef( {icon_type === 'chevron' ? ( ) : ( - + )}
{children}
diff --git a/src/features/components/atoms/alert/index.tsx b/src/features/components/atoms/alert/index.tsx index cce7d30f84e..9df9cfd1841 100644 --- a/src/features/components/atoms/alert/index.tsx +++ b/src/features/components/atoms/alert/index.tsx @@ -27,8 +27,8 @@ const Alert = ({ return ( - - + +
diff --git a/src/features/components/atoms/card/card-primary/index.tsx b/src/features/components/atoms/card/card-primary/index.tsx index 0595eac0826..ed7246c196d 100644 --- a/src/features/components/atoms/card/card-primary/index.tsx +++ b/src/features/components/atoms/card/card-primary/index.tsx @@ -52,7 +52,7 @@ const CardPrimary = ({ )} diff --git a/src/features/components/atoms/container/fixed/index.tsx b/src/features/components/atoms/container/fixed/index.tsx index 02af5dbe067..f2ced6fa500 100644 --- a/src/features/components/atoms/container/fixed/index.tsx +++ b/src/features/components/atoms/container/fixed/index.tsx @@ -4,7 +4,7 @@ import { ContentSectionTagOptions } from 'features/types' import dclsx from 'features/utils/dclsx' const FixedContainer = ({ className, ...rest }: BoxProps) => { - const classnames = dclsx(className, 'container-fixed') + const classnames = dclsx(className, 'at-container-fixed') return } diff --git a/src/features/components/atoms/container/fluid/index.tsx b/src/features/components/atoms/container/fluid/index.tsx index ae36a8c01e5..40e7a9a4806 100644 --- a/src/features/components/atoms/container/fluid/index.tsx +++ b/src/features/components/atoms/container/fluid/index.tsx @@ -4,7 +4,7 @@ import { ContentSectionTagOptions } from 'features/types' import dclsx from 'features/utils/dclsx' const FluidContainer = ({ className, ...rest }: BoxProps) => { - const classnames = dclsx(className, 'container-fluid') + const classnames = dclsx(className, 'at-container-fluid') return } diff --git a/src/features/components/atoms/flex-box/box/index.tsx b/src/features/components/atoms/flex-box/box/index.tsx index a067a747d1d..f552113c978 100644 --- a/src/features/components/atoms/flex-box/box/index.tsx +++ b/src/features/components/atoms/flex-box/box/index.tsx @@ -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, }) } @@ -59,10 +59,10 @@ const FlexBoxContainer = ({ ...rest }: FlexBoxProps) => { const classnames = dclsx( - 'flex', + 'at-flex', className, { - [`container-${container}`]: container, + [`at-container-${container}`]: container, }, generateFlexItemClasses({ align_self, grow, shrink, basis }), generateFlexItemClasses(md ?? {}, 'md'), diff --git a/src/features/components/atoms/flex-box/item/index.tsx b/src/features/components/atoms/flex-box/item/index.tsx index e4b9827abb6..bdc6436aae4 100644 --- a/src/features/components/atoms/flex-box/item/index.tsx +++ b/src/features/components/atoms/flex-box/item/index.tsx @@ -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, }) } diff --git a/src/features/components/atoms/icon/index.tsx b/src/features/components/atoms/icon/index.tsx index 36319a9dcfe..afb5a3b4416 100644 --- a/src/features/components/atoms/icon/index.tsx +++ b/src/features/components/atoms/icon/index.tsx @@ -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 diff --git a/src/features/components/atoms/input/checkbox/index.tsx b/src/features/components/atoms/input/checkbox/index.tsx index 42e65b46c06..7f032e11977 100644 --- a/src/features/components/atoms/input/checkbox/index.tsx +++ b/src/features/components/atoms/input/checkbox/index.tsx @@ -7,7 +7,7 @@ const CheckboxInput = forwardRef {children} diff --git a/src/features/components/atoms/input/text/index.tsx b/src/features/components/atoms/input/text/index.tsx index f631fe63a2e..3ddcdad177c 100644 --- a/src/features/components/atoms/input/text/index.tsx +++ b/src/features/components/atoms/input/text/index.tsx @@ -18,13 +18,13 @@ const TextInput = forwardRef( ({ formId, error, className, label, clearErrors, setValue, ...rest }, ref) => { const notValid = error && error.length ? 'error' : 'valid' return ( -
+
{error && ( error icon { setValue(formId, '') clearErrors() @@ -36,7 +36,7 @@ const TextInput = forwardRef( @@ -47,7 +47,7 @@ const TextInput = forwardRef( diff --git a/src/features/components/atoms/link/internal.tsx b/src/features/components/atoms/link/internal.tsx index 2d8f10a9898..8517810437d 100644 --- a/src/features/components/atoms/link/internal.tsx +++ b/src/features/components/atoms/link/internal.tsx @@ -93,8 +93,8 @@ const Internal = ({ rel={link_rel} className={dclsx( className, - 'typography-link', - 'typography', + 'at-typography-link', + 'at-typography', generateSpacingClasses({ margin, padding, @@ -125,8 +125,8 @@ const Internal = ({ textcolor, }), { - 'typography-hover': !no_hover, - 'typography-color-brand': is_active, + 'at-typography-hover': !no_hover, + 'at-typography-color-brand': is_active, }, )} > diff --git a/src/features/components/atoms/tab/base/index.tsx b/src/features/components/atoms/tab/base/index.tsx index 3c36c2f9238..d82cb44d468 100644 --- a/src/features/components/atoms/tab/base/index.tsx +++ b/src/features/components/atoms/tab/base/index.tsx @@ -32,7 +32,7 @@ const TabBase = ({ return ( diff --git a/src/features/components/atoms/table/base/index.tsx b/src/features/components/atoms/table/base/index.tsx index 7a5a4fd6b32..f02767dc463 100644 --- a/src/features/components/atoms/table/base/index.tsx +++ b/src/features/components/atoms/table/base/index.tsx @@ -23,10 +23,10 @@ function BaseTable({ }: TableProps) { return ( - +
diff --git a/src/features/components/atoms/table/base/table-header.tsx b/src/features/components/atoms/table/base/table-header.tsx index 2ea8adbe608..0d77ad77cc9 100644 --- a/src/features/components/atoms/table/base/table-header.tsx +++ b/src/features/components/atoms/table/base/table-header.tsx @@ -14,14 +14,14 @@ const TableHeader = ({ columns }: TableHeaderProps) {col.header} diff --git a/src/features/components/atoms/table/base/table-row.tsx b/src/features/components/atoms/table/base/table-row.tsx index edc22bd5d39..efc7ac4f955 100644 --- a/src/features/components/atoms/table/base/table-row.tsx +++ b/src/features/components/atoms/table/base/table-row.tsx @@ -16,13 +16,13 @@ const TableRow = ({ data, columns }: TableRowProps) {row[col.accessor]} diff --git a/src/features/components/atoms/table/shadow-table/index.tsx b/src/features/components/atoms/table/shadow-table/index.tsx index a9a8f51dae8..082e76a1094 100644 --- a/src/features/components/atoms/table/shadow-table/index.tsx +++ b/src/features/components/atoms/table/shadow-table/index.tsx @@ -3,7 +3,7 @@ import BaseTable, { TableProps } from '../base' import dclsx from 'features/utils/dclsx' function ShadowTable({ className, ...rest }: TableProps) { - return + return } export default ShadowTable diff --git a/src/features/components/atoms/typography/base/index.tsx b/src/features/components/atoms/typography/base/index.tsx index 50db3f8d576..5bcbb023327 100644 --- a/src/features/components/atoms/typography/base/index.tsx +++ b/src/features/components/atoms/typography/base/index.tsx @@ -48,7 +48,7 @@ const BaseTypography = ({ }: BaseTypographyProps) => { const classnames = dclsx( className, - 'typography', + 'at-typography', generateTypographyAlignClasses(align), generateTypographyAlignClasses(md?.align, 'md'), generateTypographyAlignClasses(lg?.align, 'lg'), diff --git a/src/features/components/atoms/typography/heading/index.tsx b/src/features/components/atoms/typography/heading/index.tsx index 20e0b49c9f0..0a278308581 100644 --- a/src/features/components/atoms/typography/heading/index.tsx +++ b/src/features/components/atoms/typography/heading/index.tsx @@ -9,7 +9,7 @@ interface HeadingProps extends BaseTypographyProps { } const Heading = ({ size = 'medium', weight, className, as = 'h1', ...rest }: HeadingProps) => { - const classnames = dclsx(className, 'heading', generateHeadingSize(size)) + const classnames = dclsx(className, 'at-heading', generateHeadingSize(size)) return } diff --git a/src/features/components/atoms/typography/hero/index.tsx b/src/features/components/atoms/typography/hero/index.tsx index c5c71021bc2..d5f8741836f 100644 --- a/src/features/components/atoms/typography/hero/index.tsx +++ b/src/features/components/atoms/typography/hero/index.tsx @@ -6,7 +6,7 @@ import dclsx from 'features/utils/dclsx' type HeroTextProps = BaseTypographyProps const HeroText = ({ className, ...rest }: HeroTextProps) => { - const classnames = dclsx(className, 'heading-xxxl') + const classnames = dclsx(className, 'at-heading-xxxl') return } diff --git a/src/features/components/atoms/typography/link/index.tsx b/src/features/components/atoms/typography/link/index.tsx index 1b6bd17e9e0..e1714ceab00 100644 --- a/src/features/components/atoms/typography/link/index.tsx +++ b/src/features/components/atoms/typography/link/index.tsx @@ -17,8 +17,8 @@ const TypographyLink = ({ className, size, no_hover, ...rest }: TypographyLinkPr return ( diff --git a/src/features/components/molecules/timeline-item/index.tsx b/src/features/components/molecules/timeline-item/index.tsx index 1d6ff85fcbf..1586099bd5e 100644 --- a/src/features/components/molecules/timeline-item/index.tsx +++ b/src/features/components/molecules/timeline-item/index.tsx @@ -30,7 +30,7 @@ const TimelineItem = ({ data, isLastItem, ...rest }: TimelineItemProps) => { check icon
diff --git a/src/features/components/molecules/trade-item/index.tsx b/src/features/components/molecules/trade-item/index.tsx index 3fbb2caa290..7d954b14f96 100644 --- a/src/features/components/molecules/trade-item/index.tsx +++ b/src/features/components/molecules/trade-item/index.tsx @@ -37,7 +37,7 @@ const TradeItem = ({ data, ...rest }: TradeItemProps) => { textcolor="inverted" mt="8x" mb="4x" - className={dclsx('text-medium')} + className={dclsx('at-text-medium')} > diff --git a/src/features/components/molecules/traders-hub-cta-button/index.tsx b/src/features/components/molecules/traders-hub-cta-button/index.tsx new file mode 100644 index 00000000000..ff1f2944425 --- /dev/null +++ b/src/features/components/molecules/traders-hub-cta-button/index.tsx @@ -0,0 +1,41 @@ +import React, { ComponentPropsWithRef, forwardRef } from 'react' +import { Button } from '@deriv/quill-design' +import { LabelPairedGrid2LgBoldIcon } from '@deriv/quill-icons' +import useAuthCheck from 'components/hooks/use-auth-check' +import useHandleSignup from 'components/hooks/use-handle-signup' +import { handleRedirectToTradersHub } from 'components/custom/utils' +import { Localize } from 'components/localization' + +type TradersHubCtaButtonProps = ComponentPropsWithRef + +const TradersHubCtaButton = forwardRef( + ({ className, ...rest }, ref) => { + const [is_logged_in] = useAuthCheck() + const handleSignup = useHandleSignup() + + if (is_logged_in) { + return ( + + ) + } + return ( + + ) + }, +) + +TradersHubCtaButton.displayName = 'TradersHubCtaButton' + +export default TradersHubCtaButton diff --git a/src/features/components/organisms/available-options/tab-items.tsx b/src/features/components/organisms/available-options/tab-items.tsx index 585350e3608..f018c8d6e2c 100644 --- a/src/features/components/organisms/available-options/tab-items.tsx +++ b/src/features/components/organisms/available-options/tab-items.tsx @@ -73,10 +73,10 @@ const OptionsTab = ({ options_tabs }: OptionsTabType) => { return ( -
+
{options_tabs.map((option_item, index) => (
{ >
{
side_scroll(content_wrapper.current!, 25, 100, -10)} @@ -141,7 +141,7 @@ const OptionsTab = ({ options_tabs }: OptionsTabType) => {
side_scroll(content_wrapper.current!, 25, 100, 10)} diff --git a/src/features/components/quill/alert/index.tsx b/src/features/components/quill/alert/index.tsx index 77ede2dde0e..5df7e679ea7 100644 --- a/src/features/components/quill/alert/index.tsx +++ b/src/features/components/quill/alert/index.tsx @@ -25,8 +25,8 @@ const Alert = ({ return ( - - + +
diff --git a/src/features/components/quill/anchor/index.tsx b/src/features/components/quill/anchor/index.tsx new file mode 100644 index 00000000000..2c7ee23254d --- /dev/null +++ b/src/features/components/quill/anchor/index.tsx @@ -0,0 +1,18 @@ +import React, { ComponentProps } from 'react' +import { qtMerge } from '@deriv/quill-design' + +type AnchorProps = ComponentProps<'a'> + +const Anchor = ({ className, ...restProps }: AnchorProps) => { + return ( + + ) +} + +export default Anchor diff --git a/src/features/components/quill/browser-update-alert/index.tsx b/src/features/components/quill/browser-update-alert/index.tsx new file mode 100644 index 00000000000..2abcd96b21c --- /dev/null +++ b/src/features/components/quill/browser-update-alert/index.tsx @@ -0,0 +1,43 @@ +import React, { useEffect, useMemo, useState } from 'react' +import Alert from '../alert' +import { useUserBrowser } from 'components/hooks/use-user-browser' +import { browsers_minimum_required_version, cookie_key } from 'common/constants' +import { CookieStorage } from 'common/storage' + +const BrowserUpdateAlert = () => { + const [show, setShow] = useState(false) + + const { is_outdated } = useUserBrowser(browsers_minimum_required_version) + + const cookie = useMemo(() => { + return new CookieStorage(cookie_key) + }, []) + + useEffect(() => { + if (is_outdated && !cookie.get(cookie_key)) { + setShow(true) + } + }, [cookie, is_outdated]) + + const onOkClick = () => { + const expiration_date = Date.now() + 14 * 86400 * 1000 // 2 weeks later (1209600000 ms) + cookie.set(cookie_key, true, { + expires: new Date(expiration_date), + }) + + setShow(false) + } + + return show ? ( + + ) : null +} + +export default BrowserUpdateAlert diff --git a/src/features/components/quill/layout-overlay/cfd-warning-banner/desktop-text.tsx b/src/features/components/quill/layout-overlay/cfd-warning-banner/desktop-text.tsx new file mode 100644 index 00000000000..bebef42716a --- /dev/null +++ b/src/features/components/quill/layout-overlay/cfd-warning-banner/desktop-text.tsx @@ -0,0 +1,50 @@ +import React, { useEffect, useRef } from 'react' +import { Text } from '@deriv/quill-design' +import { useWindowSize } from 'usehooks-ts' +import clsx from 'clsx' +import Anchor from '../../anchor' +import { cfd_container, desktop_text, desktop_text_wrap } from './styles.module.scss' +import { Localize } from 'components/localization' +import { useFloatingCtaContext } from 'features/contexts/floating-cta/cta.provider' + +type TextProps = { + loss_percent: number +} + +const DesktopText = ({ loss_percent }: TextProps) => { + const { setCtaBottom } = useFloatingCtaContext() + const ref = useRef(null) + const { width } = useWindowSize() + useEffect(() => { + if (width >= 640) { + setCtaBottom(ref.current?.clientHeight) + } + }, [setCtaBottom, width]) + return ( + + ) +} + +export default DesktopText diff --git a/src/features/components/quill/layout-overlay/cfd-warning-banner/index.tsx b/src/features/components/quill/layout-overlay/cfd-warning-banner/index.tsx new file mode 100644 index 00000000000..2e6233b7cb9 --- /dev/null +++ b/src/features/components/quill/layout-overlay/cfd-warning-banner/index.tsx @@ -0,0 +1,32 @@ +import React from 'react' +import { graphql, useStaticQuery } from 'gatsby' +import MobileText from './mobile-text' +import DesktopText from './desktop-text' +import useRegion from 'components/hooks/use-region' +import usePpc from 'features/hooks/use-ppc' + +const CfdWarningBanner = () => { + const { is_ppc } = usePpc() + const { is_eu, is_cpa_plan } = useRegion() + + const data = useStaticQuery(graphql` + query { + strapiCfdWarningBanner { + loss_percent + } + } + `) + const loss_percent = data?.strapiCfdWarningBanner?.loss_percent + + if (is_ppc || is_eu || is_cpa_plan) { + return ( + <> + + + + ) + } + return <> +} + +export default CfdWarningBanner diff --git a/src/features/components/quill/layout-overlay/cfd-warning-banner/mobile-text.tsx b/src/features/components/quill/layout-overlay/cfd-warning-banner/mobile-text.tsx new file mode 100644 index 00000000000..7374540da92 --- /dev/null +++ b/src/features/components/quill/layout-overlay/cfd-warning-banner/mobile-text.tsx @@ -0,0 +1,89 @@ +import React, { useEffect, useRef, useState } from 'react' +import { Text } from '@deriv/quill-design' +import { useWindowSize } from 'usehooks-ts' +import clsx from 'clsx' +import Anchor from '../../anchor' +import { mobile_text_wrap, mobile_text_container } from './styles.module.scss' +import { Localize } from 'components/localization' +import { useFloatingCtaContext } from 'features/contexts/floating-cta/cta.provider' +import Arrow from 'images/svg/arrow_expandable.svg' + +type TextProps = { + loss_percent: number +} + +const MobileText = ({ loss_percent }: TextProps) => { + const [expanded, setExpanded] = useState(false) + const { setCtaBottom } = useFloatingCtaContext() + const { width } = useWindowSize() + const ref = useRef(null) + useEffect(() => { + if (width < 640) { + setCtaBottom(ref.current?.clientHeight) + } + }, [setCtaBottom, expanded, width]) + + const onImageLoad = () => { + if (width < 640) { + setCtaBottom(ref.current?.clientHeight) + } + } + + const toggleExpansion = () => { + setExpanded((prev) => !prev) + } + + return ( +
+
+ {expanded ? ( + + , + ]} + /> + + ) : ( + + , + ]} + /> + + )} +
+ Expand +
+ ) +} + +export default MobileText diff --git a/src/features/components/quill/layout-overlay/cfd-warning-banner/styles.module.scss b/src/features/components/quill/layout-overlay/cfd-warning-banner/styles.module.scss new file mode 100644 index 00000000000..fed519feb85 --- /dev/null +++ b/src/features/components/quill/layout-overlay/cfd-warning-banner/styles.module.scss @@ -0,0 +1,29 @@ +.cfd_container { + @media only screen and (min-width: 1024px){ + width: 90%; + } + @media only screen and (min-width: 1536px){ + inline-size: 80%; + max-inline-size: 123.2rem; + } +} +.mobile_text_wrap { + @media only screen and (min-width: 640px){ + display: none; + } +} +.mobile_text_container { + @media only screen and (min-width: 1024px){ + width: 90%; + } +} +.desktop_text_wrap { + @media only screen and (min-width: 640px){ + display: block; + } +} +.desktop_text{ + @media only screen and (min-width: 1280px){ + font-size: 16px; + } +} \ No newline at end of file diff --git a/src/features/components/quill/layout-overlay/cookie-banner/index.tsx b/src/features/components/quill/layout-overlay/cookie-banner/index.tsx new file mode 100644 index 00000000000..11ff001fd89 --- /dev/null +++ b/src/features/components/quill/layout-overlay/cookie-banner/index.tsx @@ -0,0 +1,75 @@ +import React, { useEffect, useRef, useState } from 'react' +import clsx from 'clsx' +import { Text, Button } from '@deriv/quill-design' +import { CustomLink } from '@deriv-com/components' +import { cookie_banner, desktop_text } from './styles.module.scss' +import { useCookieBanner } from 'components/hooks/use-cookie-banner' +import { Localize } from 'components/localization' + +const CookieBanner = () => { + const cookie = useCookieBanner() + const [is_visible, setIsVisible] = useState(false) + const timer_ref = useRef() + + // Todo: Should simplify this useEffect and get rid of the duplicated state and find another solution + // for removing the element from the DOM after the animation completes. + useEffect(() => { + if (is_visible !== cookie.should_show) { + if (cookie.should_show) { + setIsVisible(cookie.should_show) + } else { + timer_ref.current = setTimeout(() => setIsVisible(cookie.should_show), 200) + } + } + + return () => { + clearTimeout(timer_ref.current) + } + }, [cookie.should_show, is_visible]) + + if (is_visible) { + return ( +
+ + + + + , + ]} + /> + +
+
+ +
+
+ +
+
+
+ ) + } + + return <> +} + +export default CookieBanner diff --git a/src/features/components/quill/layout-overlay/cookie-banner/styles.module.scss b/src/features/components/quill/layout-overlay/cookie-banner/styles.module.scss new file mode 100644 index 00000000000..6da3db1be45 --- /dev/null +++ b/src/features/components/quill/layout-overlay/cookie-banner/styles.module.scss @@ -0,0 +1,13 @@ +.cookie_banner { + @media only screen and (min-width: 768px){ + border-radius: 8px; + max-width: 400px; + margin: 20px; + } +} + +.desktop_text{ + @media only screen and (min-width: 1280px){ + font-size: 16px; + } +} \ No newline at end of file diff --git a/src/features/components/quill/layout-overlay/floating-button/index.tsx b/src/features/components/quill/layout-overlay/floating-button/index.tsx new file mode 100644 index 00000000000..bb24b3ef4db --- /dev/null +++ b/src/features/components/quill/layout-overlay/floating-button/index.tsx @@ -0,0 +1,28 @@ +import React, { useState } from 'react' +import clsx from 'clsx' +import { floating_button } from './styles.module.scss' + +type TProps = { + children: (has_hover: boolean) => JSX.Element + onClick?: React.MouseEventHandler + className?: string +} +const FloatingButton = ({ children, className, onClick }: TProps) => { + const [has_hover, setHasHover] = useState(false) + return ( + + ) +} + +export default FloatingButton diff --git a/src/features/components/quill/layout-overlay/floating-button/styles.module.scss b/src/features/components/quill/layout-overlay/floating-button/styles.module.scss new file mode 100644 index 00000000000..e3167f65e47 --- /dev/null +++ b/src/features/components/quill/layout-overlay/floating-button/styles.module.scss @@ -0,0 +1,5 @@ +.floating_button { + @media only screen and (min-width: 640px){ + padding: 14px; + } +} \ No newline at end of file diff --git a/src/features/components/quill/layout-overlay/index.tsx b/src/features/components/quill/layout-overlay/index.tsx new file mode 100644 index 00000000000..8875e233424 --- /dev/null +++ b/src/features/components/quill/layout-overlay/index.tsx @@ -0,0 +1,62 @@ +import React, { lazy, Suspense } from 'react' +import clsx from 'clsx' +import pMinDelay from 'p-min-delay' +import loadable from '@loadable/component' +import { wrapper_ltr, wrapper_rtl } from './styles.module.scss' +import CfdWarningBanner from './cfd-warning-banner' +import { useIsRtl } from 'components/hooks/use-isrtl' +import { useFloatingCtaContext } from 'features/contexts/floating-cta/cta.provider' + +const LiveChatButton = loadable(() => pMinDelay(import('./live-chat-button'), 5000)) +const WhatsappButton = loadable(() => pMinDelay(import('./whats-app-button'), 5000)) +const CookieBanner = lazy(() => import('./cookie-banner')) + +function calculatePercentageOfNumber(percentage: number, number: number) { + const result = (percentage / 100) * number + return result.toFixed(2) +} + +const LayoutOverlay = () => { + const is_rtl = useIsRtl() + const { visibilityPercentage } = useFloatingCtaContext() + + return ( +
+
+
+ }> + + +
+
+ + +
+
+ +
+ ) +} + +export default LayoutOverlay diff --git a/src/features/components/quill/layout-overlay/live-chat-button/index.tsx b/src/features/components/quill/layout-overlay/live-chat-button/index.tsx new file mode 100644 index 00000000000..1c5073d1e5c --- /dev/null +++ b/src/features/components/quill/layout-overlay/live-chat-button/index.tsx @@ -0,0 +1,134 @@ +import React, { useCallback, useEffect, useRef, useState } from 'react' +import { Script } from 'gatsby' +import FloatingButton from '../floating-button' +import LiveChatIC from 'images/svg/layout/chat-normal.svg' +import LiveChatHover from 'images/svg/layout/chat-hover.svg' +import useAuthCheck from 'components/hooks/use-auth-check' +import { getClientInformation, getDomain, getUTMData, isBrowser } from 'common/utility' +import useBreakpoints from 'components/hooks/use-breakpoints' + +const LiveChatButton = () => { + const url_params = new URLSearchParams((isBrowser() && window.location.search) || '') + const is_livechat_query = url_params.get('is_livechat_open') + + const [is_livechat_interactive, setIsLivechatInteractive] = useState(false) + const [is_script_loaded, setIsScriptLoaded] = useState(false) + const LC_API = useRef() + + const [is_logged_in] = useAuthCheck() + const { is_mobile } = useBreakpoints() + + const onLiveChatReady = useCallback(() => { + setIsLivechatInteractive(true) + LC_API.current = window.LC_API + + // we open and close the window to trigger the widget to listen for new events + window.LC_API.open_chat_window() + window.LC_API.hide_chat_window() + + const domain = getDomain() + const utm_data = getUTMData(domain) + const client_information = getClientInformation(domain) + const url_params = new URLSearchParams(window.location.search) + + const { utm_source, utm_medium, utm_campaign } = utm_data || {} + + const { + loginid, + email, + landing_company_shortcode, + currency, + residence, + first_name, + last_name, + } = client_information || {} + + /* the session variables are sent to CS team dashboard to notify user has logged in + and also acts as custom variables to trigger targeted engagement */ + const session_variables = { + is_logged_in: is_logged_in, + loginid: loginid ?? '', + landing_company_shortcode: landing_company_shortcode ?? '', + currency: currency ?? '', + residence: residence ?? '', + email: email ?? '', + platform: url_params.get('platform') ?? '', + utm_source: utm_source ?? '', + utm_medium: utm_medium ?? '', + utm_campaign: utm_campaign ?? '', + } + + window.LiveChatWidget.call('set_session_variables', session_variables) + + if (is_logged_in) { + if (email) { + window.LiveChatWidget.call('set_customer_email', email) + } + if (first_name && last_name) { + window.LiveChatWidget.call('set_customer_name', `${first_name} ${last_name}`) + } + } else { + // clear name and email fields after chat has ended + window.LC_API.on_chat_ended = () => { + window.LiveChatWidget.call('set_customer_email', ' ') + window.LiveChatWidget.call('set_customer_name', ' ') + } + } + + // open chat widget when there is an incoming greeting/announcement + window.LiveChatWidget.on('new_event', (event) => { + if (event.greeting) { + window.LC_API.open_chat_window() + } + }) + + if (is_livechat_query?.toLowerCase() === 'true') { + window.LC_API.open_chat_window() + } + }, [is_livechat_query, is_logged_in]) + + useEffect(() => { + if (isBrowser()) { + window.LiveChatWidget.on('ready', onLiveChatReady) + } + return () => { + if (isBrowser()) { + window.LiveChatWidget.off('ready', onLiveChatReady) + } + } + }, [onLiveChatReady]) + + return ( + <> +