Browse Source
Have dprint format TypeScript and JavaScript files
no-contract-setup-message
Thomas Eizinger
3 years ago
No known key found for this signature in database
GPG Key ID: 651AC83A6C6C8B96
3 changed files with
5 additions and
5 deletions
-
dprint.json
-
frontend/src/Maker.tsx
-
frontend/src/Taker.tsx
|
|
@ -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", |
|
|
|
|
|
@ -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 */ |
|
|
|
|
|
@ -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)} |
|
|
|