mirror of https://github.com/certusone/oyster.git
Metaplex: Feature/m (#103)
* unused components * dont count up, display finished label * clean file names (spaces dont work) * hide auction end time when no auction * style artcard countdown
This commit is contained in:
parent
7f11a55478
commit
7533b80d0f
|
@ -10,7 +10,7 @@
|
|||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
padding: 24px;
|
||||
padding: 0;
|
||||
text-align: left;
|
||||
|
||||
/* gradients/metal */
|
||||
|
@ -27,8 +27,17 @@
|
|||
font-family: Inter;
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
padding: 24px 24px 0 24px;
|
||||
}
|
||||
|
||||
.ant-card-meta {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.ant-avatar.ant-avatar-circle {
|
||||
margin-left: 24px;
|
||||
}
|
||||
|
||||
.small {
|
||||
|
@ -38,10 +47,11 @@
|
|||
}
|
||||
|
||||
.cd-container {
|
||||
// background: linear-gradient(270deg, #616774 7.29%, #403F4C 100%);
|
||||
// box-shadow: inset 0px 4px 20px rgba(0, 0, 0, 0.3);
|
||||
// border-radius: 0px 0px 8px 8px;
|
||||
margin-top: 10px;
|
||||
background: linear-gradient(270deg, #616774 7.29%, #403F4C 100%);
|
||||
box-shadow: inset 0px 4px 20px rgba(0, 0, 0, 0.3);
|
||||
border-radius: 0px 0px 8px 8px;
|
||||
margin-top: 20px;
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
.cd-title {
|
||||
|
|
|
@ -66,14 +66,16 @@ export const ArtCard = (props: ArtCardProps) => {
|
|||
title={`${name}`}
|
||||
description={<div>
|
||||
<Avatar src="img/artist1.jpeg" /> {artist}
|
||||
<div className="cd-container">
|
||||
{(hours == 0 && minutes == 0 && seconds == 0) ?
|
||||
<div className="cd-title">Finished</div>
|
||||
: <>
|
||||
<div className="cd-title">Ending in</div>
|
||||
<div className="cd-time">{hours}h {minutes}m {seconds}s</div>
|
||||
</>}
|
||||
</div>
|
||||
{endAuctionAt &&
|
||||
<div className="cd-container">
|
||||
{(hours == 0 && minutes == 0 && seconds == 0) ?
|
||||
<div className="cd-title">Finished</div>
|
||||
: <>
|
||||
<div className="cd-title">Ending in</div>
|
||||
<div className="cd-time">{hours}h {minutes}m {seconds}s</div>
|
||||
</>}
|
||||
</div>
|
||||
}
|
||||
</div>}
|
||||
/>
|
||||
</Card>
|
||||
|
|
|
@ -19,3 +19,7 @@ export const getCountdown = (ts: number) => {
|
|||
|
||||
return { days, hours, minutes, seconds };
|
||||
};
|
||||
|
||||
export const cleanName = (name: string): string => {
|
||||
return name.replaceAll(' ', '-');
|
||||
};
|
||||
|
|
|
@ -36,6 +36,7 @@ import {
|
|||
import { Connection, PublicKey } from '@solana/web3.js';
|
||||
import { MintLayout } from '@solana/spl-token';
|
||||
import { useHistory, useParams } from 'react-router-dom';
|
||||
import { cleanName } from '../../utils/utils';
|
||||
|
||||
const { Step } = Steps;
|
||||
const { Option } = Select;
|
||||
|
@ -344,7 +345,7 @@ const UploadStep = (props: {
|
|||
onClick={() => {
|
||||
props.setAttributes({
|
||||
...props.attributes,
|
||||
files: [mainFile, coverFile].filter(f => f),
|
||||
files: [mainFile, coverFile].filter(f => f).map(f => new File([f], cleanName(f.name), { type: f.type })),
|
||||
image,
|
||||
});
|
||||
props.confirm();
|
||||
|
|
Loading…
Reference in New Issue