Skip to content

Commit

Permalink
Merge pull request #129 from ankitkarna99/fixes/minor-1
Browse files Browse the repository at this point in the history
NFT Minor Fixes
  • Loading branch information
flashburst committed Dec 27, 2023
2 parents 1ef200f + d3195a6 commit cb2a900
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/hooks/actions/useMint.jsx
Expand Up @@ -114,7 +114,11 @@ const useMint = ({ nftDetails, activePolicies, points, requiredPoints }) => {
if (!nftDetails.level) {
const eligibilityCheckList = [
{
label: 'Have an active policy',
label: (
<div>
Have an <button onClick={() => { return openMarketplace() }}>active policy</button>
</div>
),
completed: activePolicies.length > 0
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/views/home/HomePersona.jsx
Expand Up @@ -102,7 +102,7 @@ const HomePersona = ({ characters }) => {
if (nextLevel === 0) {
return {
image: `${imageOrigin}/thumbnails/180001.webp`,
url: '/marketplace?soulbound=true',
url: '/marketplace?soulbound=true&minted=false',
soulbound: true
}
}
Expand Down
9 changes: 9 additions & 0 deletions src/views/marketplace/MarketplaceSection.jsx
Expand Up @@ -35,6 +35,8 @@ const MarketPlaceSection = ({ data = [], filters = [], pageData }) => {
const initial = useRef(true)
const inputRef = useRef(null)

const filtersCount = Object.keys(additionalFilters).length

const router = useRouter()

const debouncedSearchValue = useDebounce(searchValue, 500)
Expand Down Expand Up @@ -209,6 +211,7 @@ const MarketPlaceSection = ({ data = [], filters = [], pageData }) => {
Properties
</Button>
<div className='filter dialog wrapper'>

<Button
variant='secondary-gray'
size='md'
Expand All @@ -221,6 +224,12 @@ const MarketPlaceSection = ({ data = [], filters = [], pageData }) => {
Filter
</Button>

{filtersCount > 0 && (
<div className='filter count'>
{filtersCount}
</div>
)}

<div className={`filter dialog${showFilters ? ' open' : ''}`} ref={ref}>
<div className='filter title mobile'>
<div>Filter</div>
Expand Down
11 changes: 11 additions & 0 deletions src/views/marketplace/MarketplaceSection.scss
Expand Up @@ -60,6 +60,17 @@
position: relative;
height: 100%;

.filter.count {
position: absolute;
top: -8px;
right: -8px;
background-color: colors.$error-500;
color: colors.$base-white;
padding: 3px 8px;
border-radius: 50%;
@include styles.text-xs;
}

@media (max-width: 768px) {
height: unset;
}
Expand Down
23 changes: 23 additions & 0 deletions src/views/merkle-proof/MerkleProofView.jsx
Expand Up @@ -11,6 +11,7 @@ import { Button } from '@/components/Button/Button'
import { ConnectWallet } from '@/components/ConnectWallet/ConnectWallet'
import { LoaderPopup } from '@/components/LoaderPopup/LoaderPopup'
import Switch from '@/components/Switch/Switch'
import { Tags } from '@/components/Tags/Tags'
import { ToastContext } from '@/components/Toast/Toast'
import {
ContractAbis,
Expand Down Expand Up @@ -236,6 +237,7 @@ const MerkleProofView = () => {
<div>Liquidity</div>
<div>Points</div>
<div>Level</div>
<div>Persona</div>
{!showLiveData && (
<div>Proof</div>
)}
Expand All @@ -248,7 +250,28 @@ const MerkleProofView = () => {
<div>{formatDollar(row.policy)}</div>
<div>{formatDollar(row.liquidity)}</div>
<div className='points'>{formatNumber(parseFloat(row.points))}</div>

<div>{row.level}</div>
<div>
<Tags
tags={[
{
id: '1',
slug: '1',
text: row.persona
? row.persona === 1
? 'Guardian'
: 'Beast'
: 'Not Set',
color: row.persona
? row.persona === 1
? 'green'
: 'pink'
: 'gray'
}
]}
/>
</div>
{!showLiveData && (
<div className='view-proof'>
<button onClick={() => {
Expand Down
4 changes: 2 additions & 2 deletions src/views/merkle-proof/MerkleProofView.scss
Expand Up @@ -95,12 +95,12 @@

.row {
display: grid;
grid-template-columns: 450px 184px 184px 184px 90px 122px;
grid-template-columns: 400px 184px 184px 124px 80px 120px 122px;
@include styles.text-md;
@include weights.semibold;

&.live {
grid-template-columns: 450px 192px 192px 192px 188px;
grid-template-columns: 400px 184px 184px 192px 134px 120px;
}

& > div {
Expand Down

0 comments on commit cb2a900

Please sign in to comment.