From 6e8209b0fc7cef679708b2ad2543c204b5717a78 Mon Sep 17 00:00:00 2001 From: aswathy-deriv Date: Thu, 2 Nov 2023 15:47:58 +0400 Subject: [PATCH] feat: redirecting the ctrader to tradershub --- crowdin/messages.json | 29 ------------------- .../main-nav/main-nav-buttons/index.tsx | 9 ++++-- 2 files changed, 7 insertions(+), 31 deletions(-) diff --git a/crowdin/messages.json b/crowdin/messages.json index 84af34e72b0..f7513b265bd 100644 --- a/crowdin/messages.json +++ b/crowdin/messages.json @@ -1,7 +1,6 @@ { "3670321": "<0>IVV.US The iShares Core S&P 500 ETF tracks the performance of an index of large-capitalisation US equities.", "3965745": "Your payout can potentially grow by 1% or 5% on average per tick.", - "4007432": "Singapore", "4506932": "How do I add a Deriv X account?", "5681962": "EUR/USD DFX10 Index", "6312314": "Deriv (V) Ltd (Company No. 014556), incorporated on the 17th February 2016, is registered in the Republic of Vanuatu with its registered office located at 1276, Govant Building, Kumul Highway, Port Vila, Republic of Vanuatu. Deriv (V) Ltd is licensed by the Vanuatu Financial Services Commission <0>(view licence) and is a member of the <1>Financial Markets Association.", @@ -159,7 +158,6 @@ "158763587": "Check the profit", "159648667": "A chart illustrating a winning Over trade type contract", "160123390": "European <0>indices", - "161085261": "Questions about becoming our affiliates or other business collaboration opportunities? ", "161870324": "Pick the best rates and place an order, or create an ad for the rates you want.", "163040015": "Join Deriv’s affiliate and IB programmes and get a chance to be a partner with a trusted online trading provider.", "165821674": "human resources department", @@ -212,7 +210,6 @@ "222070679": "We’ll deposit your commissions directly into your account as soon as practicable after the 15th of every month.", "222685906": "( 1", "223464180": "Clients in the rest of the world (except for certain countries such as the USA, Canada, and Hong Kong) who wish to trade CFDs on financial instruments (via MT5 Financial accounts) and derived indices (via MT5 Derived accounts) can have Deriv MT5 and Deriv X accounts under Deriv (V) Ltd.", - "224644767": "Business Partnership", "224650827": "IOT/USD", "225329740": "A chart illustrating an accumulators contract payout", "228957856": "Let’s say you want to keep 0.01 lots of Volatility 75 Index with an asset price of 400,000 USD and swap rate of -7.5 open for one night.", @@ -657,7 +654,6 @@ "640307277": "Vice President of Engineering", "640979467": "<0>IWM.US The iShares Russell 2000 ETF tracks the investment results of an index of small-capitalisation US equities.", "642995056": "Email", - "643554455": "See frequently asked questions on popular topics to get quick answers.", "643714136": "Binary bot for creating trading bot", "645294370": "<0>A trading mentor
Do you mentor other traders? Help them become better traders and earn commission when they sign up and trade on our platforms.", "645317079": "We'll remove the <0>withdrawal limit once your account has been verified.", @@ -901,7 +897,6 @@ "878676836": "Key information documents", "878897196": "Deal cancellation isn’t available for Crash and Boom indices. The stop-out feature will close your contract automatically when your loss reaches or exceeds a percentage of your stake. The stop-out percentage is shown below your stake on Deriv Trader and varies according to your chosen multiplier.", "878922748": "What is the CFDs account?", - "879478126": "Dubai", "881413021": "Why trade commodities on Deriv", "882216897": "Email is required", "882980057": "Trading available everyday", @@ -1024,7 +1019,6 @@ "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.", - "1011758107": "Berlin", "1015371290": "Experienced affiliate managers answer all your queries and provide you with excellent promotional and educational materials.", "1015510435": "BMW", "1016846951": "> USD 20,000 per month", @@ -1116,7 +1110,6 @@ "1097188292": "Take profit level", "1098544147": "They ask you to fill up a form on an unsecure website without an HTTPS (secured) connection.", "1098718347": "Know the margin impact on your CFD trading", - "1099021729": "Rwanda", "1099312636": "Who can become a premium payment agent?", "1099692935": "You can trade Touch/No Touch options on the Deriv Trader, SmartTrader, and Deriv Bot trading platforms. They are available on multiple markets — forex, commodities, stock indices, and synthetics.", "1101454934": "If you select 'Fall', you receive the payout if the exit price is lower than the entry price.", @@ -1152,7 +1145,6 @@ "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.", - "1135059547": "Ask everyone", "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.", @@ -1183,7 +1175,6 @@ "1171765024": "Step 3", "1172611503": "If you select ‘Asian Fall’, you will win the payout if the last tick is lower than the average of the ticks.", "1172806588": "Make instant deposits using your local e-wallet.", - "1175183064": "Vanuatu", "1175717636": "What kind of reports can I generate from my affiliate account?", "1177080017": "DBot | Trading robot | Deriv", "1178409440": "The time period during which an asset or market is available for trading.", @@ -1216,7 +1207,6 @@ "1206384192": "VTI.US", "1207548197": "Payouts for all potential outcomes are calculated based strictly on the probabilities of each occurring at the time the trade is placed.", "1207745067": "TBT.US", - "1207874210": "Cayman Islands", "1208382171": "We may request more information during the signup process.", "1211358412": "What does \"reset\" mean in Reset Call and Reset Put trades?", "1211817306": "Cryptocurrency trades available on Deriv", @@ -1339,7 +1329,6 @@ "1326235397": "These indices correspond to simulated markets with constant volatilities of 10%, 25%, 50%, 75%, and 100%.", "1327067520": "Deriv P2P makes withdrawals and deposits simple, it’s the best user-friendly app.", "1328010458": "A professional trader searching for a liquidity solutions provider", - "1329552872": "Europe", "1329985014": "38,000+", "1330415177": "<0>Watch this video to learn how to build a trading bot on Deriv Bot. Also, <1>check out this blog post on building a trading bot.", "1331252898": "20 - 500", @@ -1428,7 +1417,6 @@ "1409308163": "Favourite assets", "1410320737": "Go to Deriv MT5 dashboard", "1411032790": "Multiple charts to view your online trading", - "1411975375": "Visit our Help centre", "1412121500": "How do I open a Touch/No Touch contract on Deriv?", "1412644174": "We process your deposits and withdrawals internally within 1 to 3 business days (depending on your <0>payment method). It may take longer for your funds to reach you due to the different processing times by banks and payment service providers. See our <0>Payment methods page for a complete list of the processing times for each payment method.", "1413295628": "DIA.US", @@ -1561,7 +1549,6 @@ "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.", "1549352292": "With turbo options, you need to define a barrier before opening a contract. If the spot price touches or breaches this barrier at any time throughout the contract duration, your contract will expire worthless. This means that you will not receive a payout and will lose your initial stake amount. To compensate for this risk, turbo options will have a higher payout per point and potential payout, depending on how far the selected barrier is from the opening spot price. Another difference to note is that trading turbo options carries more risk than trading vanilla options.", "1549497379": "High leverage, tight forex spreads", - "1550284135": "Jordan", "1550413103": "checklist", "1550574351": "Let’s say you want to keep two lots of EUR/USD with a point value of 0.00001 and swap rate of -0.12 open for one night.", "1551153165": "You can trade the following options on Deriv:", @@ -1609,7 +1596,6 @@ "1582462514": "Check your spelling and try again", "1584418118": "You can generate all kinds of helpful reports to track and optimise your campaigns, such as the", "1584558075": "Promote your services to Deriv clients in your country.", - "1586065334": "Paraguay", "1586341728": "Smart Gold Index", "1586599741": "Clients or payment agents can discuss and negotiate fees with the premium payment agent.", "1587479998": "Convenient deposits and withdrawals", @@ -1660,7 +1646,6 @@ "1624895344": "Payment methods you will accept from clients", "1625849815": "Due to regulatory requirements, derived indices are unavailable in some countries. Refer to ‘Product offering’ in our <0>terms of use for more info.", "1625898053": "Make easy deposits via any major bank.", - "1627067256": "Latin America", "1627655124": "To place a vanilla options contract, you’ll need to:", "1628981793": "Can I trade cryptocurrencies on Deriv Bot?", "1631281562": "GBP Basket", @@ -1890,7 +1875,6 @@ "1841197848": "tradeAgain", "1841788070": "Palladium/USD", "1841852640": "Deriv partnership programmes", - "1842132259": "Middle East", "1842268335": "No results for <0>'{{search_value}}'", "1842306349": "Trade stocks", "1844394355": "5. If you're adding your first Deriv X account, you'll need to set your Deriv X password. If you've already set your Deriv X password, you'll need to enter it now.", @@ -1959,7 +1943,6 @@ "1899843488": "margin calculator", "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.", - "1902951214": "Our offices", "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.", @@ -3297,18 +3280,6 @@ "-1867937110": "Email ID had a typo error", "-1567349106": "Firewall filter", "-1961258037": "Didn't receive an email from us? Here's what could've happened.", - "-246512194": "We’re here to help", - "-980586483": "United Kingdom", - "-705682181": "Malta", - "-1625504236": "Guernsey", - "-623790227": "Asia", - "-283810073": "Malaysia", - "-1576550133": "Hong Kong", - "-1847522411": "Africa", - "-1552543730": "Caribbean", - "-2098459063": "British Virgin Islands", - "-1077630901": "Oceania", - "-1439893219": "Got questions? Here's how to get answers.", "-1278724614": "Have any query or need assistance, check out the details to call our international help desk and our email ID. Feel free to contact us anytime!", "-316740382": "1. Select your asset", "-2109493526": "2. Set purchase conditions", diff --git a/src/features/components/templates/navigation/main-nav/main-nav-buttons/index.tsx b/src/features/components/templates/navigation/main-nav/main-nav-buttons/index.tsx index 9ca2d5e5d2b..ee74c5870fc 100644 --- a/src/features/components/templates/navigation/main-nav/main-nav-buttons/index.tsx +++ b/src/features/components/templates/navigation/main-nav/main-nav-buttons/index.tsx @@ -7,11 +7,13 @@ import useHandleSignup from 'components/hooks/use-handle-signup' import usePpc from 'features/hooks/use-ppc' import LanguageSwitcher from 'features/components/molecules/language-switcher' import Flex from 'features/components/atoms/flex-box' -import { handleGetTrading } from 'components/custom/utils' +import { handleGetTrading, handleRedirectToTradersHub } from 'components/custom/utils' +import { getLocationPathname } from 'common/utility' const MainNavButtons = () => { const [is_logged_in] = useAuthCheck() const { is_ppc_redirect } = usePpc() + const is_ctrader = getLocationPathname().includes('deriv-ctrader') const handleLogin = useHandleLogin() const handleSignup = useHandleSignup(is_ppc_redirect) @@ -25,7 +27,10 @@ const MainNavButtons = () => { gap="8x" > {is_logged_in ? ( - + ) : (