refactor: more TS code

This commit is contained in:
Tristan Yang
2022-07-04 23:13:09 +08:00
parent 627082eacb
commit e0872b1dd3
28 changed files with 56 additions and 126 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import { FC } from "react";
import { FC, ReactNode } from "react";
import Tippy from "@tippyjs/react";
import styled from "styled-components";
import Profile from "../Profile";
@@ -15,7 +15,7 @@ const Styled = styled.span`
interface Props {
uid: number;
popover?: boolean;
cid: number;
cid?: number;
textOnly?: boolean;
}
+1 -1
View File
@@ -113,7 +113,7 @@ const renderContent = (data) => {
(match, idx) => {
console.log("match", match);
const uid = match.trim().slice(1);
return <Mention key={idx} uid={uid} popover={false} />;
return <Mention key={idx} uid={+uid} popover={false} />;
}
)}
</span>