refactor: add typescript support to project

This commit is contained in:
HD
2022-06-29 16:54:58 +08:00
parent ccfee28e13
commit 003353e43f
33 changed files with 358 additions and 224 deletions
+2 -4
View File
@@ -22,8 +22,7 @@ export default function SendMagicLinkPage() {
}, [isSuccess]);
useEffect(() => {
if (error) {
console.log(error);
if (error && "status" in error) {
switch (error.status) {
case "PARSING_ERROR":
toast.error(error.data);
@@ -32,7 +31,7 @@ export default function SendMagicLinkPage() {
toast.error("Username or Password Incorrect");
break;
case 404:
toast.error("Account not exsit");
toast.error("Account not exist");
break;
default:
toast.error("Something Error");
@@ -53,7 +52,6 @@ export default function SendMagicLinkPage() {
const handleInput = (evt: ChangeEvent<HTMLInputElement>) => {
const { value } = evt.target;
console.log(value);
setEmail(value);
};
+2 -1
View File
@@ -1,4 +1,5 @@
import styled from "styled-components";
const StyledWrapper = styled.div`
display: flex;
justify-content: center;
@@ -8,7 +9,7 @@ const StyledWrapper = styled.div`
max-width: 440px;
padding: 32px 40px 32px 40px;
/* border: 1px solid #eee; */
box-shadow: 0px 4px 8px -2px rgba(16, 24, 40, 0.1), 0px 2px 4px -2px rgba(16, 24, 40, 0.06);
box-shadow: 0 4px 8px -2px rgba(16, 24, 40, 0.1), 0px 2px 4px -2px rgba(16, 24, 40, 0.06);
border-radius: 12px;
.tips {
display: flex;