fix: 修复品牌预览渲染循环与区域点选
This commit is contained in:
1 parent
bb0709b8cc
commit
18ddf125be
4 files changed
+107
-72
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { CloudUploadOutlined, DeleteOutlined, PictureOutlined } from "@ant-design/icons";
|
||||
import { Alert, Button, Image, Popconfirm, Space, Spin, Upload, message } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useEffect, useMemo, useState } from "react";
|
||||
import { createApiClient } from "../lib/api.js";
|
||||
|
||||
interface ImageUrlFieldProps {
|
||||
@@ -17,7 +17,7 @@ export function ImageUrlField({ id, value, onChange, placeholder, scope }: Image
|
||||
const [storageStatus, setStorageStatus] = useState<
|
||||
"loading" | "ok" | "unavailable" | "unconfigured"
|
||||
>("loading");
|
||||
const client = createApiClient();
|
||||
const client = useMemo(() => createApiClient(), []);
|
||||
|
||||
useEffect(() => {
|
||||
let active = true;
|
||||
|
||||
Reference in new issue
Block a user