refactor: add typescript support to project
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user