refactor: more TS code

This commit is contained in:
Tristan Yang
2022-07-08 19:13:49 +08:00
parent 678b8515ca
commit 9f1b115c73
55 changed files with 421 additions and 338 deletions
+6 -3
View File
@@ -2,6 +2,7 @@ import styled from "styled-components";
import useInviteLink from "../hook/useInviteLink";
import Input from "./styled/Input";
import Button from "./styled/Button";
import { FC } from "react";
const StyledWrapper = styled.div`
display: flex;
@@ -37,8 +38,8 @@ const StyledWrapper = styled.div`
margin-bottom: 20px;
}
`;
export default function InviteLink() {
type Props = {};
const InviteLink: FC<Props> = () => {
const { generating, link, linkCopied, copyLink, generateNewLink } = useInviteLink();
const handleNewLink = () => {
generateNewLink();
@@ -59,4 +60,6 @@ export default function InviteLink() {
</Button>
</StyledWrapper>
);
}
};
export default InviteLink;