chore: updates
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user