chore: update version to 0.9.31 in package.json and add magic link authentication strings in English and Chinese

This commit is contained in:
haorwen
2025-12-12 23:46:53 +08:00
parent 36d25f86d3
commit c3ccf5a03f
4 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -1,4 +1,5 @@
import { useNavigate } from "react-router-dom";
import { useTranslation } from "react-i18next";
import Button from "@/components/styled/Button";
@@ -7,13 +8,14 @@ type Props = {
};
export default function MagicLinkLogin({ email }: Props) {
const navigate = useNavigate();
const { t } = useTranslation("auth", { keyPrefix: "login" });
const handleLogin = () => {
navigate(`/send_magic_link/${email}`);
};
return (
<Button className="w-full ghost" onClick={handleLogin}>
Sign in with a Magic Link
{t("magic_link")}
</Button>
);
}