diff --git a/components/JsonPreview.tsx b/components/JsonPreview.tsx index fa4f882..f6fcfe5 100644 --- a/components/JsonPreview.tsx +++ b/components/JsonPreview.tsx @@ -66,7 +66,7 @@ export const JsonPreview = ({ {show && (
-
{JSON.stringify(content, null, 2).trim()}
+
{content ? JSON.stringify(content, null, 2).trim() : '{}'}
)} diff --git a/components/collections/actions/Action.tsx b/components/collections/actions/Action.tsx index e56f57a..9063f00 100644 --- a/components/collections/actions/Action.tsx +++ b/components/collections/actions/Action.tsx @@ -337,8 +337,11 @@ export const CollectionActions = ({ const { isLoading, mutate } = useMutation( async (event: FormEvent) => { event.preventDefault() + if (!wallet.isWalletConnected) { + throw new Error('Please connect your wallet first.') + } if (!type) { - throw new Error('Please select an action!') + throw new Error('Please select an action.') } if (minterContractAddress === '' && sg721ContractAddress === '') { throw new Error('Please enter minter and sg721 contract addresses!')