chore: fix some warnings

This commit is contained in:
Tristan Yang
2023-07-21 19:07:39 +08:00
parent 7941bddf72
commit 351a636abe
6 changed files with 15 additions and 23 deletions
+1
View File
@@ -44,6 +44,7 @@
"thirdparty", "thirdparty",
"tippyjs", "tippyjs",
"toastui", "toastui",
"udecode",
"uiball", "uiball",
"uids", "uids",
"unreads", "unreads",
+1
View File
@@ -98,6 +98,7 @@ const ContextMenu: FC<Props> = ({ items = [], hideMenu = null }) => {
if (subs.length > 0) if (subs.length > 0)
return ( return (
<WrapWithSubmenu <WrapWithSubmenu
key={title}
items={subs} items={subs}
hideMenu={hideMenu} hideMenu={hideMenu}
child={ child={
+2 -2
View File
@@ -53,9 +53,9 @@ const ImageMessage: FC<Props> = ({
</div> </div>
)} )}
{status == "loading" ? ( {status == "loading" ? (
<p className="w-full h-full flex-center bg-primary-50/80 dark:bg-primary-900/70"> <div className="w-full h-full flex-center bg-primary-50/80 dark:bg-primary-900/70">
<LineWobble /> <LineWobble />
</p> </div>
) : ( ) : (
<img <img
className="h-auto w-full cursor-zoom-in object-cover preview" className="h-auto w-full cursor-zoom-in object-cover preview"
+1 -1
View File
@@ -25,7 +25,7 @@ interface Props {
content: string; content: string;
download: string; download: string;
thumbnail: string; thumbnail: string;
properties: { properties?: {
local_id: number; local_id: number;
name: string; name: string;
size: number; size: number;
+5 -15
View File
@@ -27,12 +27,12 @@ const renderContent = ({
context, context,
to = 0, to = 0,
from_uid = 0, from_uid = 0,
created_at, created_at = 0,
properties, properties,
content_type, content_type,
content, content,
download, download = "",
thumbnail, thumbnail = "",
edited = false edited = false
}: Props) => { }: Props) => {
let ctn = null; let ctn = null;
@@ -74,7 +74,7 @@ const renderContent = ({
download={download} download={download}
thumbnail={thumbnail} thumbnail={thumbnail}
from_uid={from_uid} from_uid={from_uid}
created_at={created_at} created_at={created_at ?? 0}
content={content} content={content}
/> />
); );
@@ -83,17 +83,7 @@ const renderContent = ({
case ContentTypes.archive: case ContentTypes.archive:
{ {
// const { size, name, file_type } = properties; // const { size, name, file_type } = properties;
ctn = ( ctn = <ForwardedMessage context={context} to={to} from_uid={from_uid} id={content} />;
<ForwardedMessage
properties={properties}
context={context}
to={to}
from_uid={from_uid}
created_at={created_at}
id={content}
thumbnail={thumbnail}
/>
);
} }
break; break;
+5 -5
View File
@@ -169,8 +169,8 @@ const Send: FC<IProps> = ({
<div <div
className={clsx( className={clsx(
`flex justify-between items-center gap-4 px-4 py-3.5`, `flex justify-between items-center px-4 py-3.5`,
isMarkdownMode && `grid grid-cols-[1fr_1fr] grid-rows-[auto_auto] gap-0` isMarkdownMode ? `grid grid-cols-[1fr_1fr] grid-rows-[auto_auto] gap-0` : "gap-4"
)} )}
> >
<EmojiPicker selectEmoji={insertEmoji} /> <EmojiPicker selectEmoji={insertEmoji} />
@@ -212,7 +212,7 @@ const Send: FC<IProps> = ({
}; };
export default Send; export default Send;
// export default memo(Send, (prevs, nexts) => { // export default memo(Send, (prev, next) => {
// console.log("send name", prevs.name, nexts.name); // console.log("send name", prev.name, next.name);
// return prevs.name == nexts.name; // return prev.name == next.name;
// }); // });