mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-24 22:19:37 -04:00
33 lines
859 B
TypeScript
33 lines
859 B
TypeScript
import { Button } from "@mui/material";
|
|
import Alert from "@mui/material/Alert";
|
|
import { useNavigate } from "react-router-dom";
|
|
import { useResumeableSwapsCountExcludingPunished } from "store/hooks";
|
|
|
|
export default function UnfinishedSwapsAlert() {
|
|
const resumableSwapsCount = useResumeableSwapsCountExcludingPunished();
|
|
const navigate = useNavigate();
|
|
|
|
if (resumableSwapsCount > 0) {
|
|
return (
|
|
<Alert
|
|
severity="warning"
|
|
variant="filled"
|
|
action={
|
|
<Button
|
|
variant="outlined"
|
|
size="small"
|
|
onClick={() => navigate("/history")}
|
|
>
|
|
VIEW
|
|
</Button>
|
|
}
|
|
>
|
|
You have{" "}
|
|
{resumableSwapsCount > 1
|
|
? `${resumableSwapsCount} pending swaps`
|
|
: "one pending swap"}
|
|
</Alert>
|
|
);
|
|
}
|
|
return null;
|
|
}
|