chore: remove redundant error placeholders

This commit is contained in:
asiaznik 2024-03-08 14:44:19 +01:00
parent a12bf26cb4
commit dbe31e6a67
No known key found for this signature in database
GPG Key ID: 4D5C8972A02C52C2

View File

@ -4,7 +4,6 @@ import type { OrderFormValues } from '../../hooks/use-form-values';
import { determinePriceStep, useValidateAmount } from '@vegaprotocol/utils';
import {
TradingFormGroup,
TradingInputError,
Tooltip,
FormGroup,
Input,
@ -32,30 +31,6 @@ export const DealTicketPriceTakeProfitStopLoss = ({
const validateAmount = useValidateAmount();
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 (
<div className="mb-2">
<div className="flex flex-col gap-2">
@ -165,8 +140,6 @@ export const DealTicketPriceTakeProfitStopLoss = ({
</TradingFormGroup>
</div>
</div>
{renderTakeProfitError()}
{renderStopLossError()}
</div>
);
};