From 2150fc4b9e637cae1bda3c4242efd4c98be94272 Mon Sep 17 00:00:00 2001 From: bartosz-lipinski <264380+bartosz-lipinski@users.noreply.github.com> Date: Mon, 5 Apr 2021 08:46:35 -0500 Subject: [PATCH] feat: upload --- .../metavinci/src/views/artCreate/index.tsx | 49 ++++++++++++------- .../metavinci/src/views/artCreate/styles.less | 41 ++++++++++++++++ 2 files changed, 71 insertions(+), 19 deletions(-) diff --git a/packages/metavinci/src/views/artCreate/index.tsx b/packages/metavinci/src/views/artCreate/index.tsx index 26b644a..b086384 100644 --- a/packages/metavinci/src/views/artCreate/index.tsx +++ b/packages/metavinci/src/views/artCreate/index.tsx @@ -14,6 +14,7 @@ export const ArtCreateView = () => { const { wallet, connected } = useWallet(); const [step, setStep] = useState(0); const [attributes, setAttributes] = useState({ + type: 'image', files: [], }); @@ -37,8 +38,14 @@ export const ArtCreateView = () => { - - {step === 0 && setStep(1)} />} + + {step === 0 && { + setAttributes({ + ...attributes, + type + }) + setStep(1); + }} />} {step === 1 && setStep(2)} />} {step === 2 && mint()} />} @@ -47,21 +54,23 @@ export const ArtCreateView = () => { ); }; -const CategoryStep = (props: { confirm: () => void }) => { +const CategoryStep = (props: { confirm: (type: string) => void }) => { return ( <> -

What type of artwork are you creating?

+

Create your NFT artwork on Meta

+

Creating NFT on Solana is not only low cost for artists but supports environment with 20% of the fees form the platform donated to charities.

- - - - - - + + + + + + + + + ); @@ -74,8 +83,9 @@ const UploadStep = (props: { attributes: any, setAttributes: (attr: any) => void <>

Now, let's upload your creation

+

Your file will be uploaded to the decentralized web via Arweave. Depending on file type, can take up to 1 minute. Arweave is a new type of storage that backs data with sustainable and perpetual endowments, allowing users and developers to truly store data forever – for the very first time.

- + { // dont upload files here, handled outside of the control @@ -85,7 +95,7 @@ const UploadStep = (props: { attributes: any, setAttributes: (attr: any) => void props.setAttributes({ ...props.attributes, files: [ - info.file, + info.file.originFileObj, ], }); }}> @@ -110,9 +120,13 @@ const MintStep = (props: { confirm: () => void }) => { return ( <> -

Add details about your artwork

+

Describe your creation

+

Provide detailed description of your creative process to engage with your audience.

- + + + + void }) => { placeholder="Description" /> - - -