refactor: more TS code
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user