small fix on image type

This commit is contained in:
Weitheng Haw 2025-01-28 14:24:40 +00:00
parent 57eb548cbb
commit 639d2bdea7

View File

@ -167,7 +167,7 @@ export default function FaceLibrary() {
await axios.post(`/faces/${renameData.newName}/create`);
const oldFaceImages = faceData[renameData.oldName] || [];
const copyPromises = oldFaceImages.map(async (image) => {
const copyPromises = oldFaceImages.map(async (image: string) => {
const response = await fetch(`${baseUrl}clips/faces/${renameData.oldName}/${image}`);
const blob = await response.blob();
@ -190,7 +190,7 @@ export default function FaceLibrary() {
setRenameDialog(false);
setRenameData({ oldName: '', newName: '' });
await refreshFaces(); // Wait for refresh to complete
await refreshFaces();
toast.success("Successfully renamed face", { position: "top-center" });
} catch (error) {
const axiosError = error as AxiosError<{ message: string }>;