Browse Source

Have dprint format TypeScript and JavaScript files

no-contract-setup-message
Thomas Eizinger 3 years ago
parent
commit
58297e2c2b
No known key found for this signature in database GPG Key ID: 651AC83A6C6C8B96
  1. 2
      dprint.json
  2. 2
      frontend/src/Maker.tsx
  3. 6
      frontend/src/Taker.tsx

2
dprint.json

@ -7,7 +7,7 @@
"wrap_comments": true,
"comment_width": 120
},
"includes": ["**/*.{md,rs,toml}"],
"includes": ["**/*.{md,rs,toml,ts,tsx,js}"],
"excludes": ["**/target",
"**/sqlx-data.json",
"frontend/dist",

2
frontend/src/Maker.tsx

@ -17,11 +17,11 @@ import { useAsync } from "react-async";
import { Route, Routes } from "react-router-dom";
import { useEventSource } from "react-sse-hooks";
import "./App.css";
import OrderTile from "./components/OrderTile";
import CfdTile from "./components/CfdTile";
import CurrencyInputField from "./components/CurrencyInputField";
import useLatestEvent from "./components/Hooks";
import NavLink from "./components/NavLink";
import OrderTile from "./components/OrderTile";
import { Cfd, Order } from "./components/Types";
/* TODO: Change from localhost:8001 */

6
frontend/src/Taker.tsx

@ -152,7 +152,7 @@ export default function App() {
<Text>Quantity:</Text>
<CurrencyInputField
onChange={(valueString: string) => {
setQuantity(parse(valueString))
setQuantity(parse(valueString));
if (!order) {
return;
@ -162,8 +162,8 @@ export default function App() {
let payload: MarginRequestPayload = {
leverage: order.leverage,
price: order.price,
quantity
}
quantity,
};
calculateMargin(payload);
}}
value={format(quantity)}

Loading…
Cancel
Save