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",
"tippyjs",
"toastui",
"udecode",
"uiball",
"uids",
"unreads",
+1
View File
@@ -98,6 +98,7 @@ const ContextMenu: FC<Props> = ({ items = [], hideMenu = null }) => {
if (subs.length > 0)
return (
<WrapWithSubmenu
key={title}
items={subs}
hideMenu={hideMenu}
child={
+2 -2
View File
@@ -53,9 +53,9 @@ const ImageMessage: FC<Props> = ({
</div>
)}
{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 />
</p>
</div>
) : (
<img
className="h-auto w-full cursor-zoom-in object-cover preview"
+1 -1
View File
@@ -25,7 +25,7 @@ interface Props {
content: string;
download: string;
thumbnail: string;
properties: {
properties?: {
local_id: number;
name: string;
size: number;
+5 -15
View File
@@ -27,12 +27,12 @@ const renderContent = ({
context,
to = 0,
from_uid = 0,
created_at,
created_at = 0,
properties,
content_type,
content,
download,
thumbnail,
download = "",
thumbnail = "",
edited = false
}: Props) => {
let ctn = null;
@@ -74,7 +74,7 @@ const renderContent = ({
download={download}
thumbnail={thumbnail}
from_uid={from_uid}
created_at={created_at}
created_at={created_at ?? 0}
content={content}
/>
);
@@ -83,17 +83,7 @@ const renderContent = ({
case ContentTypes.archive:
{
// const { size, name, file_type } = properties;
ctn = (
<ForwardedMessage
properties={properties}
context={context}
to={to}
from_uid={from_uid}
created_at={created_at}
id={content}
thumbnail={thumbnail}
/>
);
ctn = <ForwardedMessage context={context} to={to} from_uid={from_uid} id={content} />;
}
break;
+5 -5
View File
@@ -169,8 +169,8 @@ const Send: FC<IProps> = ({
<div
className={clsx(
`flex justify-between items-center gap-4 px-4 py-3.5`,
isMarkdownMode && `grid grid-cols-[1fr_1fr] grid-rows-[auto_auto] gap-0`
`flex justify-between items-center px-4 py-3.5`,
isMarkdownMode ? `grid grid-cols-[1fr_1fr] grid-rows-[auto_auto] gap-0` : "gap-4"
)}
>
<EmojiPicker selectEmoji={insertEmoji} />
@@ -212,7 +212,7 @@ const Send: FC<IProps> = ({
};
export default Send;
// export default memo(Send, (prevs, nexts) => {
// console.log("send name", prevs.name, nexts.name);
// return prevs.name == nexts.name;
// export default memo(Send, (prev, next) => {
// console.log("send name", prev.name, next.name);
// return prev.name == next.name;
// });