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:
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user