Browse Source

Improve closing Cfd message in the taker UI

- Present the timestamp in human-readable format instead of Unix time,
- use lowercase action name
release/0.3.1
Mariusz Klochowicz 3 years ago
parent
commit
d2200e3702
No known key found for this signature in database GPG Key ID: 470C865699C8D4D
  1. 7
      taker-frontend/src/components/CloseButton.tsx

7
taker-frontend/src/components/CloseButton.tsx

@ -13,6 +13,7 @@ import {
} from "@chakra-ui/react";
import * as React from "react";
import { Cfd, StateGroupKey, StateKey } from "../types";
import Timestamp from "./Timestamp";
interface Props {
cfd: Cfd;
@ -44,8 +45,10 @@ export default function CloseButton({ cfd, request, status, action }: Props) {
<PopoverCloseButton />
<PopoverBody>
<Text>
This will {action} your position with the counterparty. The exchange rate at {cfd
.expiry_timestamp}
This will {action.toLowerCase()} your position with the counterparty. The exchange rate at
</Text>
<Timestamp timestamp={cfd.expiry_timestamp} />
<Text>
will determine your profit/losses. It is likely that the rate will change until then.
</Text>
</PopoverBody>

Loading…
Cancel
Save