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

Commit

Permalink
chore: updated dmt5 trading signals
Browse files Browse the repository at this point in the history
  • Loading branch information
hasan-deriv committed Mar 1, 2024
1 parent 26e5d34 commit 04e9d79
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import device from 'themes/device'
import useRegion from 'components/hooks/use-region'
import { TString } from 'types/generics'
import { localize } from 'components/localization'
import useBuildVariant from 'features/hooks/use-build-variant'

type TContent = {
header: TString
Expand Down Expand Up @@ -215,13 +216,13 @@ type SignalStepsProps = {
}

const SignalSteps = ({ active_tab }: SignalStepsProps) => {
const { region } = useBuildVariant()
const data = useStaticQuery(query)
const [is_mounted] = usePageLoaded() // needed to fix tab highlighting not being rerendered during first load
const [signal_subscriber, signal_provider] = [
active_tab === 'signal-subscriber',
active_tab === 'signal-provider',
]
const { is_eu } = useRegion()

return (
<>
Expand All @@ -239,7 +240,7 @@ const SignalSteps = ({ active_tab }: SignalStepsProps) => {
<Tabs.Panel
label={subscriber.step_one_header}
description={
is_eu
region === "eu"
? subscriber.step_one_text_eu
: subscriber.step_one_text
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ const Separator = styled.div`
background-color: var(--color-grey-21);
`

const DMT5TradingSignals = () => {
const DMT5TradingSignals = ({ pageContext }: TGatsbyHead) => {
const { region } = pageContext
const [active_tab, setActiveTab] = useTabStateQuery(['signal-subscriber', 'signal-provider'])
const [is_mounted] = usePageLoaded() //needs to fix bug with hightlight of the 1st loading
const [signal_subscriber, signal_provider] = [
Expand All @@ -107,7 +108,7 @@ const DMT5TradingSignals = () => {
]

return (
<Layout>
<Layout region={region}>
<Hero jc="cneter" ai="center">
<SmallContainer>
<Header as="h1" type="display-title" color="white" align="center">
Expand Down

0 comments on commit 04e9d79

Please sign in to comment.