From 58a0977443443fcc37bd18bbf4d48a1a0a7fd1b0 Mon Sep 17 00:00:00 2001
From: Jordan Prince
Date: Mon, 5 Apr 2021 10:58:13 -0500
Subject: [PATCH] hook up connections to card from form
---
.../src/components/ArtCard/index.tsx | 21 ++--
.../metavinci/src/views/artCreate/index.tsx | 110 +++++++++++-------
2 files changed, 80 insertions(+), 51 deletions(-)
diff --git a/packages/metavinci/src/components/ArtCard/index.tsx b/packages/metavinci/src/components/ArtCard/index.tsx
index ec0a34e..29320dc 100644
--- a/packages/metavinci/src/components/ArtCard/index.tsx
+++ b/packages/metavinci/src/components/ArtCard/index.tsx
@@ -1,10 +1,17 @@
import React, { useLayoutEffect, useState } from 'react';
-import { Link, useLocation } from 'react-router-dom';
-import { Card, Avatar } from 'antd';
+import { Card } from 'antd';
const { Meta } = Card;
-export const ArtCard = ({ file }: { file?: File }) => {
+export const ArtCard = ({
+ file,
+ name,
+ symbol,
+}: {
+ file?: File;
+ name?: String;
+ symbol?: String;
+}) => {
const [imgSrc, setImgSrc] = useState();
useLayoutEffect(() => {
@@ -19,13 +26,7 @@ export const ArtCard = ({ file }: { file?: File }) => {
return (
}>
-
- }
- title="Card title"
- description="This is the description"
- />
+
);
};
diff --git a/packages/metavinci/src/views/artCreate/index.tsx b/packages/metavinci/src/views/artCreate/index.tsx
index 2798fcb..8d75941 100644
--- a/packages/metavinci/src/views/artCreate/index.tsx
+++ b/packages/metavinci/src/views/artCreate/index.tsx
@@ -1,5 +1,14 @@
import React, { useState } from 'react';
-import { Steps, Row, Button, Upload, Col, Input, Statistic, Descriptions } from 'antd';
+import {
+ Steps,
+ Row,
+ Button,
+ Upload,
+ Col,
+ Input,
+ Statistic,
+ Descriptions,
+} from 'antd';
import { InboxOutlined } from '@ant-design/icons';
import { ArtCard } from './../../components/ArtCard';
import './styles.less';
@@ -12,6 +21,7 @@ const { Dragger } = Upload;
interface IProps {
type: string;
name: string;
+ symbol: String;
description: string;
// preview image
image: string;
@@ -28,6 +38,7 @@ export const ArtCreateView = () => {
const [attributes, setAttributes] = useState({
type: 'image',
name: '',
+ symbol: '',
description: '',
external_url: '',
image: '',
@@ -81,18 +92,19 @@ export const ArtCreateView = () => {
setStep(3)}
- />)}
+ confirm={() => setStep(3)}
+ />
+ )}
{step === 3 && (
setStep(4)}
setAttributes={setAttributes}
- confirm={() => setStep(4)} />)}
+ />
+ )}
{step === 4 && (
- mint()}
- />)}
+ mint()} />
+ )}
>
@@ -111,27 +123,27 @@ const CategoryStep = (props: { confirm: (type: string) => void }) => {
-
-
-
+
+
+
>
);
@@ -207,7 +219,15 @@ const InfoStep = (props: {
- {file && }
+
+ {file && (
+
+ )}
+
@@ -271,8 +295,12 @@ const RoyaltiesStep = (props: {
{file && }