From 523f01a7193be1eabee5daeb3f90260e58ef27f3 Mon Sep 17 00:00:00 2001 From: bartosz-lipinski <264380+bartosz-lipinski@users.noreply.github.com> Date: Fri, 16 Apr 2021 22:57:29 -0500 Subject: [PATCH] feat: create auction --- .../src/components/ArtCard/index.tsx | 25 +- .../src/components/ArtContent/index.tsx | 20 +- packages/metavinci/src/hooks/index.ts | 1 + packages/metavinci/src/hooks/useUserArts.tsx | 16 + .../metavinci/src/views/artworks/index.tsx | 12 +- .../src/views/auctionCreate/index.tsx | 357 +++++++----------- packages/metavinci/src/views/styles.less | 21 ++ 7 files changed, 212 insertions(+), 240 deletions(-) create mode 100644 packages/metavinci/src/hooks/useUserArts.tsx diff --git a/packages/metavinci/src/components/ArtCard/index.tsx b/packages/metavinci/src/components/ArtCard/index.tsx index 817ab4e..e7bfe60 100644 --- a/packages/metavinci/src/components/ArtCard/index.tsx +++ b/packages/metavinci/src/components/ArtCard/index.tsx @@ -1,21 +1,12 @@ import React, { useLayoutEffect, useState } from 'react'; -import { Card, Avatar } from 'antd'; +import { Card, Avatar, CardProps } from 'antd'; import { MetadataCategory } from '@oyster/common'; import { ArtContent } from './../ArtContent'; import './index.less'; const { Meta } = Card; -export const ArtCard = ({ - image, - category, - name, - symbol, - description, - artist, - preview, - small, -}: { +export interface ArtCardProps extends CardProps { image?: string; category?: MetadataCategory name?: string; @@ -23,13 +14,17 @@ export const ArtCard = ({ description?: string; artist?: string; preview?: boolean; - small?: boolean -}) => { + small?: boolean; +} + +export const ArtCard = (props: ArtCardProps) => { + const { className, small, category, image, name, preview, artist, ...rest } = props; return ( } + className={`art-card ${small ? 'small' : ''} ${className}`} + cover={} + {...rest} > { +export const ArtContent = ({ + content, + category, + className, + preview + }: { + category?: MetadataCategory, + content?: string, + className?: string, + preview?: boolean, + }) => { return category === 'video' ? -