Skip to content

Commit

Permalink
Nuzhy/QUILL-1934/barrier fields issue (#784)
Browse files Browse the repository at this point in the history
* fix: update formName prop in barrier-fields

* fix: translte now in starttime
  • Loading branch information
Nuzhy-Deriv authored Aug 9, 2024
1 parent d45fd8d commit 249b7ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/javascript/app/pages/form/barrier-fields.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import dataManager from '../../common/data_manager.js';
import { localize } from '../../../_common/localize.js';
import Defaults, { PARAM_NAMES } from '../trade/defaults.js';

const BarrierFields = ({ formName, handleAmountChange }) => {
const BarrierFields = ({ form_name, handleAmountChange }) => {
const [barrierData, setBarrierData] = useState();
const hasBarrierChange = useBarrierChange();

Expand Down Expand Up @@ -68,7 +68,7 @@ const BarrierFields = ({ formName, handleAmountChange }) => {

return (
<>
{['touchnotouch', 'higherlower'].includes(formName) &&
{['touchnotouch', 'higherlower'].includes(form_name) &&
barrier_data?.show_barrier && (
<div className='quill-form-row'>
<div className={`form_field ${!barrier_data?.isOffset ? 'field-pb' : ''}`}>
Expand All @@ -92,7 +92,7 @@ const BarrierFields = ({ formName, handleAmountChange }) => {
</div>
)}

{['endsinout', 'staysinout'].includes(formName) &&
{['endsinout', 'staysinout'].includes(form_name) &&
barrier_data?.show_barrier_highlow && (
<>
<div className='quill-form-row'>
Expand Down
2 changes: 1 addition & 1 deletion src/javascript/app/pages/trade/starttime.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const StartDates = (() => {
if (start_dates.has_spot) {
option = createElement('option', { value: 'now', text: localize('Now') });
start_dates_data.has_now = 1;
start_dates_data.options.push({ text: 'Now', value: 'now' });
start_dates_data.options.push({ text: localize('Now'), value: 'now' });
fragment.appendChild(option);
has_now = 1;
} else {
Expand Down

0 comments on commit 249b7ec

Please sign in to comment.