Browse Source

Rewrite Trade as `function` component

This allows us to co-locate the `default` export with the component
definition.
debug-collab-settlement
Thomas Eizinger 3 years ago
parent
commit
1fed25ea83
No known key found for this signature in database GPG Key ID: 651AC83A6C6C8B96
  1. 37
      taker-frontend/src/components/Trade.tsx

37
taker-frontend/src/components/Trade.tsx

@ -79,24 +79,22 @@ function AlertBox({ title, description }: AlertBoxProps) {
</Alert>);
}
const Trade = (
{
connectedToMaker,
minQuantity,
maxQuantity,
referencePrice: referencePriceAsNumber,
askPrice: askPriceAsNumber,
quantity,
onQuantityChange,
margin: marginAsNumber,
leverage,
liquidationPrice: liquidationPriceAsNumber,
onLongSubmit,
isLongSubmitting,
orderId,
walletBalance,
}: TradeProps,
) => {
export default function Trade({
connectedToMaker,
minQuantity,
maxQuantity,
referencePrice: referencePriceAsNumber,
askPrice: askPriceAsNumber,
quantity,
onQuantityChange,
margin: marginAsNumber,
leverage,
liquidationPrice: liquidationPriceAsNumber,
onLongSubmit,
isLongSubmitting,
orderId,
walletBalance,
}: TradeProps) {
let outerCircleBg = useColorModeValue("gray.100", "gray.700");
let innerCircleBg = useColorModeValue("gray.200", "gray.600");
@ -271,8 +269,7 @@ const Trade = (
</Grid>
</Center>
);
};
export default Trade;
}
interface QuantityProps {
min: number;

Loading…
Cancel
Save