diff --git a/packages/nextjs/app/create/Create.tsx b/packages/nextjs/app/create/Create.tsx index 412fe08..9b39fbe 100644 --- a/packages/nextjs/app/create/Create.tsx +++ b/packages/nextjs/app/create/Create.tsx @@ -3,8 +3,8 @@ import { useEffect, useState } from "react"; import { AttributesForm } from "./_components/AttributesForm"; import { Description } from "./_components/Description"; +import { ImageUploader } from "./_components/ImageUploader"; import { JSONViewer } from "./_components/JSONViewer"; -import { MediaPreview } from "./_components/MediaPreview"; import { MetadataForm } from "./_components/MetadataForm"; import { MintingForm } from "./_components/MintingButtons"; import { RestoreDescriptionButton } from "./_components/RestoreDescriptionButton"; @@ -81,13 +81,17 @@ export const Create: NextPage = () => { animationUrl={animationUrl} setAnimationUrl={setAnimationUrl} /> + {animationUrl && ( + + )} {/* Media Preview */} - diff --git a/packages/nextjs/app/create/_components/MediaPreview.tsx b/packages/nextjs/app/create/_components/ImageUploader.tsx similarity index 92% rename from packages/nextjs/app/create/_components/MediaPreview.tsx rename to packages/nextjs/app/create/_components/ImageUploader.tsx index 54497f5..c5b0a60 100644 --- a/packages/nextjs/app/create/_components/MediaPreview.tsx +++ b/packages/nextjs/app/create/_components/ImageUploader.tsx @@ -5,13 +5,12 @@ import Image from "next/image"; import { notification } from "~~/utils/scaffold-eth"; import { addToIPFS } from "~~/utils/simpleNFT/ipfs-fetch"; -interface MediaPreviewProps { +interface ImageUploaderProps { image: string; - animationUrl?: string; setUploadedImageIpfsPath: (path: string) => void; // For handling IPFS upload } -export const MediaPreview: React.FC = ({ image, animationUrl, setUploadedImageIpfsPath }) => { +export const ImageUploader: React.FC = ({ image, setUploadedImageIpfsPath }) => { const [previewImage, setPreviewImage] = useState(image || null); const [dragActive, setDragActive] = useState(false); const [loading, setLoading] = useState(false); @@ -125,11 +124,6 @@ export const MediaPreview: React.FC = ({ image, animationUrl, Uploading... )} - {animationUrl && ( - - )} ); }; diff --git a/packages/nextjs/contracts/deployedContracts.ts b/packages/nextjs/contracts/deployedContracts.ts index 4697f24..49d139a 100644 --- a/packages/nextjs/contracts/deployedContracts.ts +++ b/packages/nextjs/contracts/deployedContracts.ts @@ -7,7 +7,7 @@ import { GenericContractsDeclaration } from "~~/utils/scaffold-eth/contract"; const deployedContracts = { 31337: { ProfileInfo: { - address: "0x82e01223d51eb87e16a03e24687edf0f294da6f1", + address: "0x18e317a7d70d8fbf8e6e893616b52390ebbdb629", abi: [ { type: "function", @@ -75,7 +75,7 @@ const deployedContracts = { inheritedFunctions: {}, }, SimpleMint: { - address: "0x2bdcc0de6be1f7d2ee689a0342d76f52e8efaba3", + address: "0x4b6ab5f819a515382b0deb6935d793817bb4af28", abi: [ { type: "constructor", @@ -388,7 +388,7 @@ const deployedContracts = { }, }, MockNFT: { - address: "0x7969c5ed335650692bc04293b07f5bf2e7a673c0", + address: "0xcace1b78160ae76398f486c8a18044da0d66d86d", abi: [ { type: "constructor", @@ -1008,7 +1008,7 @@ const deployedContracts = { }, }, MockUSDC: { - address: "0x7bc06c482dead17c0e297afbc32f6e63d3846650", + address: "0xd5ac451b0c50b9476107823af206ed814a2e2580", abi: [ { type: "constructor", @@ -1465,7 +1465,7 @@ const deployedContracts = { }, }, Marketplace: { - address: "0xc351628eb244ec633d5f21fbd6621e1a683b1181", + address: "0xf8e31cb472bc70500f08cd84917e5a1912ec8397", abi: [ { type: "constructor", diff --git a/packages/nextjs/utils/simpleNFT/nftsMetadata.ts b/packages/nextjs/utils/simpleNFT/nftsMetadata.ts index 503a858..fc87e31 100644 --- a/packages/nextjs/utils/simpleNFT/nftsMetadata.ts +++ b/packages/nextjs/utils/simpleNFT/nftsMetadata.ts @@ -17,20 +17,25 @@ const nftsMetadata = [ ], }, { - name: "Dog in a bike", - description: "Just as expected", + name: "Desolated rails", + description: "Sometimes the shortest way is to follow the rails.", // external_url: "https://austingriffith.com/portfolio/paintings/", // <-- this can link to a page for the specific file too - image: "https://ipfs.io/ipfs/QmccnSeQc9ND2pUfEkFhQWxyU3Gu4WDRv4J11QgUtpkU3H", - animation_url: "https://ipfs.io/ipfs/QmT4RaimopnKHxAF81ut9MBFLGqun1CyTM39ZEmKxDxkoL", + image: "https://ipfs.io/ipfs/Qmdw6ujzDhn6GEcXgJbQ8KWDuFyTDD7xpMcepcqTERKgCK", + animation_url: "https://ipfs.io/ipfs/QmfF1jkVp339GXh5VtuYF3Kj4wLfKfYieQ8zp47LQWM8RP", + + attributes: [], + }, + { + name: "Fork cemetery", + description: "R.I.P.", + // external_url: "https://austingriffith.com/portfolio/paintings/", // <-- this can link to a page for the specific file too + image: "https://ipfs.io/ipfs/QmZhs1eddBRFLtZ6enF7mzk4n5trE1WyLAgtWeWNHGAigX", + animation_url: "https://ipfs.io/ipfs/QmTMwY2gRBoY2auvJZTRMtw7N4ZiPzPMqMBiRbQN5358tk", attributes: [ { - trait_type: "Dogs", - value: "U can", - }, - { - trait_type: "Moto", - value: "Cool", + trait_type: "Deaths", + value: "3 deaths", }, ], }, @@ -49,28 +54,23 @@ const nftsMetadata = [ ], }, { - name: "Fork cemetery", - description: "R.I.P.", + name: "Dog in a bike", + description: "Just as expected", // external_url: "https://austingriffith.com/portfolio/paintings/", // <-- this can link to a page for the specific file too - image: "https://ipfs.io/ipfs/QmZhs1eddBRFLtZ6enF7mzk4n5trE1WyLAgtWeWNHGAigX", - animation_url: "https://ipfs.io/ipfs/QmTMwY2gRBoY2auvJZTRMtw7N4ZiPzPMqMBiRbQN5358tk", + image: "https://ipfs.io/ipfs/QmccnSeQc9ND2pUfEkFhQWxyU3Gu4WDRv4J11QgUtpkU3H", + animation_url: "https://ipfs.io/ipfs/QmT4RaimopnKHxAF81ut9MBFLGqun1CyTM39ZEmKxDxkoL", attributes: [ { - trait_type: "Deaths", - value: "3 deaths", + trait_type: "Dogs", + value: "U can", + }, + { + trait_type: "Moto", + value: "Cool", }, ], }, - { - name: "Desolated rails", - description: "Sometimes the shortest way is to follow the rails.", - // external_url: "https://austingriffith.com/portfolio/paintings/", // <-- this can link to a page for the specific file too - image: "https://ipfs.io/ipfs/Qmdw6ujzDhn6GEcXgJbQ8KWDuFyTDD7xpMcepcqTERKgCK", - animation_url: "https://ipfs.io/ipfs/QmfF1jkVp339GXh5VtuYF3Kj4wLfKfYieQ8zp47LQWM8RP", - - attributes: [], - }, { name: "Strange Lights", description: "They look cool tho",