2022-06-06 17:06:25 +02:00
|
|
|
/*
|
|
|
|
This file is part of GNU Taler
|
|
|
|
(C) 2022 Taler Systems S.A.
|
|
|
|
|
|
|
|
GNU Taler is free software; you can redistribute it and/or modify it under the
|
|
|
|
terms of the GNU General Public License as published by the Free Software
|
|
|
|
Foundation; either version 3, or (at your option) any later version.
|
|
|
|
|
|
|
|
GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
|
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License along with
|
|
|
|
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
|
|
|
|
*/
|
2022-04-05 17:16:09 +02:00
|
|
|
import { css } from "@linaria/core";
|
|
|
|
import { Fragment, h, VNode } from "preact";
|
2022-09-13 16:07:39 +02:00
|
|
|
import { useTranslationContext } from "../context/translation.js";
|
2022-04-05 17:16:09 +02:00
|
|
|
import { Alert } from "../mui/Alert.js";
|
|
|
|
import { Button } from "../mui/Button.js";
|
2022-08-08 19:09:28 +02:00
|
|
|
import { ButtonHandler } from "../mui/handlers.js";
|
2022-04-05 17:16:09 +02:00
|
|
|
import { Paper } from "../mui/Paper.js";
|
2022-02-18 20:54:15 +01:00
|
|
|
|
2022-08-17 21:12:21 +02:00
|
|
|
const margin = css`
|
|
|
|
margin: 1em;
|
|
|
|
`;
|
|
|
|
|
2022-02-18 20:54:15 +01:00
|
|
|
export function NoBalanceHelp({
|
|
|
|
goToWalletManualWithdraw,
|
|
|
|
}: {
|
2022-08-08 19:09:28 +02:00
|
|
|
goToWalletManualWithdraw: ButtonHandler;
|
2022-02-18 20:54:15 +01:00
|
|
|
}): VNode {
|
2022-09-13 16:07:39 +02:00
|
|
|
const { i18n } = useTranslationContext();
|
2022-02-18 20:54:15 +01:00
|
|
|
return (
|
2022-08-17 21:12:21 +02:00
|
|
|
<Paper class={margin}>
|
2023-01-09 12:38:48 +01:00
|
|
|
<Alert title={i18n.str`Your wallet is empty.`} severity="info">
|
2022-04-05 17:16:09 +02:00
|
|
|
<Button
|
|
|
|
fullWidth
|
2022-08-17 21:12:21 +02:00
|
|
|
color="info"
|
2022-04-05 17:16:09 +02:00
|
|
|
variant="outlined"
|
2022-08-08 19:09:28 +02:00
|
|
|
onClick={goToWalletManualWithdraw.onClick}
|
2022-04-05 17:16:09 +02:00
|
|
|
>
|
2022-09-13 16:07:39 +02:00
|
|
|
<i18n.Translate>Get digital cash</i18n.Translate>
|
2022-04-05 17:16:09 +02:00
|
|
|
</Button>
|
|
|
|
</Alert>
|
|
|
|
</Paper>
|
2022-02-18 20:54:15 +01:00
|
|
|
);
|
|
|
|
}
|