chore: remove redundant error placeholders
This commit is contained in:
parent
a12bf26cb4
commit
dbe31e6a67
@ -4,7 +4,6 @@ import type { OrderFormValues } from '../../hooks/use-form-values';
|
|||||||
import { determinePriceStep, useValidateAmount } from '@vegaprotocol/utils';
|
import { determinePriceStep, useValidateAmount } from '@vegaprotocol/utils';
|
||||||
import {
|
import {
|
||||||
TradingFormGroup,
|
TradingFormGroup,
|
||||||
TradingInputError,
|
|
||||||
Tooltip,
|
Tooltip,
|
||||||
FormGroup,
|
FormGroup,
|
||||||
Input,
|
Input,
|
||||||
@ -32,30 +31,6 @@ export const DealTicketPriceTakeProfitStopLoss = ({
|
|||||||
const validateAmount = useValidateAmount();
|
const validateAmount = useValidateAmount();
|
||||||
const priceStep = determinePriceStep(market);
|
const priceStep = determinePriceStep(market);
|
||||||
|
|
||||||
const renderTakeProfitError = () => {
|
|
||||||
if (takeProfitError) {
|
|
||||||
return (
|
|
||||||
<TradingInputError testId="deal-ticket-take-profit-error-message">
|
|
||||||
{takeProfitError}
|
|
||||||
</TradingInputError>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
};
|
|
||||||
|
|
||||||
const renderStopLossError = () => {
|
|
||||||
if (stopLossError) {
|
|
||||||
return (
|
|
||||||
<TradingInputError testId="deal-stop-loss-error-message">
|
|
||||||
{stopLossError}
|
|
||||||
</TradingInputError>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mb-2">
|
<div className="mb-2">
|
||||||
<div className="flex flex-col gap-2">
|
<div className="flex flex-col gap-2">
|
||||||
@ -165,8 +140,6 @@ export const DealTicketPriceTakeProfitStopLoss = ({
|
|||||||
</TradingFormGroup>
|
</TradingFormGroup>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{renderTakeProfitError()}
|
|
||||||
{renderStopLossError()}
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user