From b6f239a38eb3405149c2ddb97f8930a8e204f685 Mon Sep 17 00:00:00 2001 From: mozzie Date: Mon, 6 Mar 2023 16:41:47 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=AE=A1=E7=90=86=E5=90=8E=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/admin/src/view/Login/index.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/admin/src/view/Login/index.tsx b/apps/admin/src/view/Login/index.tsx index 3dfacec..d2952ee 100644 --- a/apps/admin/src/view/Login/index.tsx +++ b/apps/admin/src/view/Login/index.tsx @@ -1,11 +1,15 @@ import { Button, Checkbox, Form, Input } from "antd"; +import { useNavigate } from "react-router-dom"; import "./index.less"; -const onFinish = (values: any) => { - console.log("Success:", values); -}; - const Login = () => { + const navigate = useNavigate(); + + const onFinish = (values: any) => { + console.log("Success:", values); + navigate("/"); + }; + return (