|
@@ -0,0 +1,124 @@
|
|
|
+"use client";
|
|
|
+import ButtonOwn from "@/components/ButtonOwn";
|
|
|
+import { ActionSheet } from "antd-mobile";
|
|
|
+import type { Action } from "antd-mobile/es/components/action-sheet";
|
|
|
+import { useTranslations } from "next-intl";
|
|
|
+import Link from "next/link";
|
|
|
+import { ChangeEvent, FC, useState } from "react";
|
|
|
+import HeaderBack from "@/components/HeaderBack";
|
|
|
+import "./page.scss";
|
|
|
+
|
|
|
+interface Props {}
|
|
|
+
|
|
|
+const Withdraw: FC<Props> = () => {
|
|
|
+ const t = useTranslations("WithdrawPage");
|
|
|
+
|
|
|
+ const actions: Action[] = [
|
|
|
+ { text: "CPF", key: "CPF" },
|
|
|
+ { text: t("Número"), key: "Celular" },
|
|
|
+ { text: "EMAIL", key: "EMAIL" },
|
|
|
+ ];
|
|
|
+ let amount = 50;
|
|
|
+ let [account, setAccount] = useState({
|
|
|
+ secretKey: "",
|
|
|
+ money: "",
|
|
|
+ });
|
|
|
+ const setInputVal = (e: ChangeEvent<HTMLInputElement>) => {
|
|
|
+ const { name, value } = e.target;
|
|
|
+ setAccount({
|
|
|
+ ...account,
|
|
|
+ [name]: value,
|
|
|
+ });
|
|
|
+ };
|
|
|
+
|
|
|
+ let [visible, setVisible] = useState(false);
|
|
|
+ let [prefix, setPrefix] = useState("CPF");
|
|
|
+ let [placeholder, setPlaceholder] = useState("000.000.000-00");
|
|
|
+ const onAction = (action: any) => {
|
|
|
+ setPrefix(action.text as any);
|
|
|
+ if (action.key == "CPF") {
|
|
|
+ setPlaceholder("000.000.000-00");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (action.key == "Celular") {
|
|
|
+ setPlaceholder("11 dígitos");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (action.key == "EMAIL") {
|
|
|
+ setPlaceholder("EMAIL");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+ return (
|
|
|
+ <>
|
|
|
+ <HeaderBack />
|
|
|
+ <div className="withdraw-box">
|
|
|
+
|
|
|
+ <div className="img-box"></div>
|
|
|
+ <p className="btn-box" color="primary">
|
|
|
+ PIX V
|
|
|
+ </p>
|
|
|
+ <h1>{t("Certifique")}</h1>
|
|
|
+ <div className="amount-box">
|
|
|
+ <span>{t("Tipo")}</span>
|
|
|
+ <div className="input-box">
|
|
|
+ <label onClick={() => setVisible(true)}>
|
|
|
+ {prefix} <span className="iconfont icon-xialaxuanze"></span>
|
|
|
+ </label>
|
|
|
+ <input
|
|
|
+ name="secretKey"
|
|
|
+ type="number"
|
|
|
+ value={account.secretKey}
|
|
|
+ onChange={setInputVal}
|
|
|
+ placeholder={placeholder}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <h1>{t("Vincule")}</h1>
|
|
|
+ <div className="amount-box">
|
|
|
+ <span>{t("Montante")} (BRL):</span>
|
|
|
+ <div className="input-box">
|
|
|
+ <input
|
|
|
+ name="money"
|
|
|
+ type="number"
|
|
|
+ value={account.money}
|
|
|
+ onChange={setInputVal}
|
|
|
+ placeholder="Mín. 10.00"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <ul className="ul-box">
|
|
|
+ <li>
|
|
|
+ {t("SaqueDisponivel")} <span className="tip">0 BRL</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ {t("Valor")} <span className="tip">0 BRL</span>{" "}
|
|
|
+ <span className="iconfont icon-iconhelp"></span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ {t("Para")},{" "}
|
|
|
+ <Link href="/" className="toHome router-link-active" replace>
|
|
|
+ {t("Aposte")}
|
|
|
+ </Link>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <div className="topUp">
|
|
|
+ <ButtonOwn active={amount > 0 ? true : false}>{t("Saque")}</ButtonOwn>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <ActionSheet
|
|
|
+ extra=""
|
|
|
+ cancelText={t("Cancelar")}
|
|
|
+ visible={visible}
|
|
|
+ actions={actions}
|
|
|
+ closeOnAction={true}
|
|
|
+ onAction={onAction}
|
|
|
+ onClose={() => setVisible(false)}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </>
|
|
|
+ );
|
|
|
+};
|
|
|
+
|
|
|
+export default Withdraw;
|