Skip to content

Commit

Permalink
fix: added market change for explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
meenakshi-deriv committed Jun 26, 2024
1 parent 576f445 commit da04a04
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/javascript/app/pages/bottom/explanation.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useState } from 'react';
import parse from 'html-react-parser';
import { contractExplanationData } from './data/explanation.js';
import { useContractChange } from '../../hooks/events';
import { useContractChange, useMarketChange } from '../../hooks/events';
import Defaults, { PARAM_NAMES } from '../trade/defaults';
import Language from '../../../_common/language';
import Url from '../../../_common/url';
Expand All @@ -13,6 +13,7 @@ export const Explanation = () => {
const [formName,setFormName] = useState('');

const hasContractChanges = useContractChange();
const hasMarketChange = useMarketChange();

useEffect(() => {
const contractObject = {
Expand All @@ -26,7 +27,7 @@ export const Explanation = () => {

setFormName(finalFormName);

},[hasContractChanges]);
},[hasContractChanges, hasMarketChange]);

const image_path = Url.urlForStatic(
`images/pages/trade-explanation/${language}/`
Expand Down

0 comments on commit da04a04

Please sign in to comment.