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

Commit

Permalink
Mayuran/dynamic urls (#5949)
Browse files Browse the repository at this point in the history
* updates for payment methods (#5849)

* updates for payment methods

* chore: empty commit

* auto-pull-translation

* translation: 📚 sync translations from crowdin feature branch

* design changed one more time..

* chore: empty commit

* chore: empty commit

* chore: empty commit

* chore: empty commit

* chore: empty commit

* chore: empty commit

* chore: empty commit

---------

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

* translations: 📚 sync translations with crowdin (#5934)

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

* fix: signup provider send null (#5935)

* translations: 📚 sync translations with crowdin (#5939)

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

* fix: all posts initial

* Habib/gtm party town integration (#5943)

* chore: add gtm to partytown url fix

* chore: add partytown proxy to gtm

* chore: remove semicolon

* chore: remove semicolon

* translations: 📚 sync translations with crowdin (#5945)

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

* fix: initial dynamic update

* fix: revert package

* fix: dynamic url

* fix: dynamic urls initial

* fix: added default value

---------

Co-authored-by: Eduard Hrachou <[email protected]>
Co-authored-by: mitra-deriv <[email protected]>
Co-authored-by: DerivFE <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: NikitK-deriv <[email protected]>
Co-authored-by: Habib Deriv <[email protected]>
  • Loading branch information
7 people authored Nov 20, 2023
1 parent a4f192c commit 83a459b
Show file tree
Hide file tree
Showing 42 changed files with 1,575 additions and 822 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ env:
GATSBY_GROWTHBOOK_DECRYPTION_KEY: ${{ secrets.GATSBY_GROWTHBOOK_DECRYPTION_KEY }}
GATSBY_RUDDERSTACK_STAGING_KEY: ${{ secrets.GATSBY_RUDDERSTACK_STAGING_KEY }}
GATSBY_RUDDERSTACK_PRODUCTION_KEY: ${{ secrets.GATSBY_RUDDERSTACK_PRODUCTION_KEY }}

GATSBY_GOOGLE_TAG_MANAGER_TRACKING_ID: ${{ secrets.GATSBY_GOOGLE_TAG_MANAGER_TRACKING_ID }}

jobs:
release-beta:
timeout-minutes: 30
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/generate-preview-link.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ jobs:
GATSBY_RUDDERSTACK_STAGING_KEY: ${{ secrets.GATSBY_RUDDERSTACK_STAGING_KEY }}
GATSBY_RUDDERSTACK_PRODUCTION_KEY: ${{ secrets.GATSBY_RUDDERSTACK_PRODUCTION_KEY }}
GATSBY_STRAPI_TOKEN: ${{ secrets.GATSBY_STRAPI_TOKEN }}
GATSBY_GOOGLE_TAG_MANAGER_TRACKING_ID: ${{ secrets.GATSBY_GOOGLE_TAG_MANAGER_TRACKING_ID }}

run: npm run build

- name: Publish to Cloudflare Pages
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ env:
GATSBY_GROWTHBOOK_DECRYPTION_KEY: ${{ secrets.GATSBY_GROWTHBOOK_DECRYPTION_KEY }}
GATSBY_RUDDERSTACK_STAGING_KEY: ${{ secrets.GATSBY_RUDDERSTACK_STAGING_KEY }}
GATSBY_RUDDERSTACK_PRODUCTION_KEY: ${{ secrets.GATSBY_RUDDERSTACK_PRODUCTION_KEY }}
GATSBY_GOOGLE_TAG_MANAGER_TRACKING_ID: ${{ secrets.GATSBY_GOOGLE_TAG_MANAGER_TRACKING_ID }}

jobs:
release-production:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ env:
GATSBY_RUDDERSTACK_STAGING_KEY: ${{ secrets.GATSBY_RUDDERSTACK_STAGING_KEY }}
GATSBY_RUDDERSTACK_PRODUCTION_KEY: ${{ secrets.GATSBY_RUDDERSTACK_PRODUCTION_KEY }}
GATSBY_STRAPI_TOKEN: ${{ secrets.GATSBY_STRAPI_TOKEN }}
GATSBY_GOOGLE_TAG_MANAGER_TRACKING_ID: ${{ secrets.GATSBY_GOOGLE_TAG_MANAGER_TRACKING_ID }}

jobs:
release-staging:
Expand Down
7 changes: 4 additions & 3 deletions crowdin/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1436,6 +1436,7 @@
"1399001016": "Let’s say you want to calculate the take profit amount when you want to open a position for Volatility 100 Index priced at 3376.24 USD with a stake amount of 10 USD, a multiplier value of x100, and a take profit level of 3400 in Up direction.",
"1400962248": "High-Close",
"1401296151": "No hidden fees",
"1402648635": "Make easy deposits and withdrawal using Mobile Money.",
"1402997163": "- Barrier levels",
"1403586449": "Competitively tighter spreads",
"1403761038": "Real account ",
Expand Down Expand Up @@ -1779,6 +1780,7 @@
"1696396625": "google",
"1700291683": "It’s completely free of charge to join the IB programme.",
"1701577545": "The maximum duration for every contract is limited and differs according to the chosen accumulator value. When the maximum duration is reached, the contract will be automatically closed.",
"1702295087": "Make easy deposits and withdrawals using Vietnam's famous banks.",
"1702860224": "You can use debit and credit cards, e-wallets, cryptocurrency wallets, Deriv P2P, online banking, fiat onramp, and payment agents for deposits and withdrawals (see our <0>Payment methods page</0> for a detailed list). Once you log in to your Deriv account, you’ll be able to see payment methods available in your country on the <1>Cashier page</1>.",
"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",
Expand Down Expand Up @@ -2264,6 +2266,7 @@
"2132941523": "Fund your Deriv real account with your preferred payment method.",
"2132973892": "Sign up for a free <0>Deriv demo account</0>.",
"2135527846": "Trade Basket indices online with Deriv. Open a demo account and enjoy a wide range of currency pairs on our responsive and intuitive trading platforms.",
"2135584635": "Make instant deposits using fiat to your crypto account.",
"2135626355": "Automate your trading. No coding required.",
"2136716746": "Partner with a trusted online trading provider",
"2137077186": "IVW.US",
Expand Down Expand Up @@ -4089,12 +4092,10 @@
"-1067388182": "Make deposits using your credit and debit cards.",
"-1318380319": "10 - 1,000",
"-67348050": "15 - 1,000",
"-136078123": "Deposit through your local payment cards.",
"-1042921151": "10 - 500",
"-699042474": "Make fast and easy deposits through your bank account.",
"-1082799567": "Make deposits and withdrawals through your local bank.",
"-509934669": "Make instant deposits using your e-wallet.",
"-1932629328": "5 - 5,000",
"-1175540863": "10 - 250",
"-854947285": "Make direct online transfers from your bank account.",
"-372193561": "Make easy deposits via any major local bank.",
"-1649952399": "No minimum",
Expand Down
7 changes: 0 additions & 7 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,13 +359,6 @@ module.exports = {
],
},
},
{
resolve: 'gatsby-plugin-google-tagmanager',
options: {
id: 'GTM-NF7884S',
includeInDevelopment: false,
},
},
{
resolve: 'gatsby-plugin-anchor-links',
options: {
Expand Down
26 changes: 26 additions & 0 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,3 +377,29 @@ exports.onCreateWebpackConfig = ({ stage, actions, loaders, getConfig }, { ...op
},
})
}

exports.createPages = async ({ graphql, actions }) => {
const { createPage } = actions

const result = await graphql(`
query {
allStrapiPost(sort: { fields: createdAt, order: DESC }) {
nodes {
hero {
title
}
}
}
}
`)

result?.data?.allStrapiPost?.nodes.forEach(({ hero }) => {
createPage({
path: `/blog/single-blog/${hero.title}`,
component: path.resolve(`./src/pages/blog/single-blog/index.tsx`),
context: {
title: hero.title,
},
})
})
}
50 changes: 30 additions & 20 deletions gatsby-ssr.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,39 @@ import './src/components/localization/config'
import GlobalProvider from './src/store/global-provider'

export const wrapRootElement = ({ element }) => {
return <GlobalProvider>{element}</GlobalProvider>
return <GlobalProvider>{element}</GlobalProvider>
}

export const wrapPageElement = WrapPagesWithLocaleContext

export const onRenderBody = ({ setHeadComponents }) => {
setHeadComponents([
<script
key="partytown-vanilla-config"
dangerouslySetInnerHTML={{
__html: `partytown = {
resolveUrl(url, location) {
// Use a secure connection
if (url?.protocol === 'http:') {
url = new URL(url.href.replace('http', 'https'))
}
// Point to our proxied URL
const proxyUrl = new URL(location.origin + '/__third-party-proxy')
proxyUrl.searchParams.append('url', url)
return proxyUrl
}
}`,
}}
/>,
])
const gtmTrackingId = process.env.GATSBY_GOOGLE_TAG_MANAGER_TRACKING_ID || ''

setHeadComponents([
<script
key="partytown-vanilla-config"
dangerouslySetInnerHTML={{
__html: `partytown = {
resolveUrl(url, location) {
// Use a secure connection
if (url?.protocol === 'http:') {
url = new URL(url.href.replace('http', 'https'))
}
// Point to our proxied URL
const proxyUrl = new URL(location.origin + '/__third-party-proxy')
proxyUrl.searchParams.append('url', url)
return proxyUrl
}
}`,
}}
/>,
gtmTrackingId && (
<script
key="gtm-script"
dangerouslySetInnerHTML={{
__html: `(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl+'';f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer', '${gtmTrackingId}');`,
}}
/>
),
])
}
Loading

0 comments on commit 83a459b

Please sign in to comment.