mirror of
https://github.com/ChanX21/Sigillum
synced 2026-04-21 15:47:55 +00:00
Add error handling for image upload failures in NFTDetails component
This commit is contained in:
parent
420f84910d
commit
8d64b7a052
1 changed files with 9 additions and 2 deletions
|
|
@ -14,7 +14,7 @@ import { GiWalrusHead } from "react-icons/gi";
|
|||
import OptimizedImage from "../shared/OptimizedImage";
|
||||
|
||||
interface NFTDetailsProps {
|
||||
compact?: boolean;
|
||||
compact?: boolean;
|
||||
setStep: (step: number) => void;
|
||||
}
|
||||
const statusSteps = [
|
||||
|
|
@ -41,7 +41,7 @@ const statusSteps = [
|
|||
label: "Tokenizing Image",
|
||||
description: "Tokenizing the image as an NFT on the blockchain.",
|
||||
icon: <Shield className="w-8 h-8" />,
|
||||
},
|
||||
},
|
||||
{
|
||||
key: "softListed",
|
||||
label: "Soft Listing on Marketplace",
|
||||
|
|
@ -123,6 +123,13 @@ export const NFTDetails = ({ compact = false, setStep }: NFTDetailsProps) => {
|
|||
return [...prev, newDetail];
|
||||
});
|
||||
});
|
||||
socket.on("image:failed", (data) => {
|
||||
handleProgress("image:authenticate")
|
||||
toast.error(data?.message || "Failed to Secure Image, try again.")
|
||||
useImageAuthStore.getState().setError(null)
|
||||
setStep(0)
|
||||
setStatusStep(0)
|
||||
});
|
||||
|
||||
socket.on("image:uploaded", (data) => {
|
||||
handleProgress("image:uploaded")
|
||||
|
|
|
|||
Loading…
Reference in a new issue