chore: updates

This commit is contained in:
Tristan Yang
2023-03-22 11:34:12 +08:00
parent 519230a101
commit 87d28c8a6a
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import { FC, useState, useEffect } from "react";
import { FC, useState, useEffect, memo } from "react";
import clsx from "clsx";
import { Ring } from "@uiball/loaders";
import Button from "./styled/Button";
@@ -39,4 +39,4 @@ const Loading: FC<Props> = ({ reload = false, fullscreen = false }) => {
);
};
export default Loading;
export default memo(Loading);
+2 -2
View File
@@ -47,13 +47,13 @@ const useUploadFile = (props?: IProps) => {
type: file_type,
size: file_size
} = file;
// file id
// 生成 file id
const resp = await prepareUploadFile({
content_type: file_type,
filename: name
});
if ("error" in resp) {
toast.error("Prepare Upload File Error");
// toast.error("Prepare Upload File Error");
return;
}
const file_id = resp.data;