This repository has been archived by the owner on Sep 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: regulatory page break * Dummy commit * chore: fixed regulatory minified * fix: heading * fix: language * fix: format * fix: added loading * change locale to localize --------- Co-authored-by: Habib Deriv <[email protected]> Co-authored-by: hasan-deriv <[email protected]>
- Loading branch information
1 parent
37f3f60
commit 58bf14f
Showing
6 changed files
with
128 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
themes/gatsby-theme-deriv/src/components/hooks/use-is-row-cpa.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { useEffect, useState } from 'react' | ||
import useRegion from './use-region' | ||
import useBuildVariant from 'features/hooks/use-build-variant' | ||
|
||
function useIsRowCpa() { | ||
const {region} = useBuildVariant() | ||
const [is_row_cpa, setIsRowCpa] = useState(true) | ||
const { is_cpa_plan } = useRegion() | ||
|
||
useEffect(() => { | ||
if (region === "row" || is_cpa_plan) { | ||
setIsRowCpa(false) | ||
} else { | ||
setIsRowCpa(true) | ||
} | ||
}, [region, is_cpa_plan]) | ||
|
||
return is_row_cpa | ||
} | ||
|
||
export default useIsRowCpa |
132 changes: 81 additions & 51 deletions
132
themes/gatsby-theme-deriv/src/pages/regulatory/_financial_commission.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.