54 lines
1.6 KiB
JavaScript
54 lines
1.6 KiB
JavaScript
import { Button, Card, Input, Space } from "antd";
|
|
import React, { useState } from "react";
|
|
import { useTranslation } from "react-i18next";
|
|
|
|
export default function HelpRescue() {
|
|
const { t } = useTranslation();
|
|
const [code, setCode] = useState("");
|
|
|
|
const handleClick = async () => {
|
|
var bodyFormData = new FormData();
|
|
bodyFormData.append("Code", code);
|
|
|
|
const res1 = await fetch(
|
|
"https://secure.logmeinrescue.com/Customer/Code.aspx",
|
|
{
|
|
method: "POST",
|
|
body: bodyFormData,
|
|
}
|
|
);
|
|
console.log("handleClick -> res1", res1);
|
|
};
|
|
|
|
return (
|
|
<Card title={t("help.labels.rescuetitle")}>
|
|
<div style={{ display: "flex", justifyContent: "center" }}>
|
|
<Space direction="vertical" align="center">
|
|
<div>{t("help.labels.rescuedesc")}</div>
|
|
<form
|
|
name="logmeinsupport"
|
|
action="https://secure.logmeinrescue.com/Customer/Code.aspx"
|
|
method="post"
|
|
>
|
|
<span>
|
|
Enter your six-digit code, then click the Start Download button
|
|
below{" "}
|
|
</span>
|
|
<input type="text" name="Code" />
|
|
<br />
|
|
<input type="submit" value="Connect to technician" />
|
|
</form>
|
|
<Input
|
|
size="large"
|
|
style={{ width: "10rem" }}
|
|
onChange={(e) => setCode(e.target.value)}
|
|
value={code}
|
|
placeholder={t("help.labels.codeplacholder")}
|
|
/>
|
|
<Button onClick={handleClick}>{t("help.actions.connect")}</Button>
|
|
</Space>
|
|
</div>
|
|
</Card>
|
|
);
|
|
}
|