Skip to content

Commit

Permalink
Merge pull request #63 from GenaDrop/stagging
Browse files Browse the repository at this point in the history
Staging to main
  • Loading branch information
Ebube111 authored Jan 9, 2024
2 parents a79e98d + ba309c8 commit 5426734
Show file tree
Hide file tree
Showing 16 changed files with 112 additions and 60 deletions.
7 changes: 5 additions & 2 deletions apps/BosGenaDrop/widget/CPlanet/DAO/Explore.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const Search = styled.div`
gap: 10px;
flex-wrap: wrap;
input {
border-radius: 32px;
border-radius: 8px;
flex-shrink: 0;
height: 48px;
width: 65%;
Expand Down Expand Up @@ -110,6 +110,9 @@ const Explore = styled.div`
flex-direction: column;
align-items: center;
justify-contents: center;
max-width: 1400px;
margin-left: auto;
margin-right: auto;
`;

const NoResult = styled.div`
Expand Down Expand Up @@ -160,7 +163,7 @@ return (
onChange={seachInputHandler}
placeholder="Search for DAOs"
/>
<FilterDropdown>Filter/Dropdown</FilterDropdown>
{/* <FilterDropdown>Filter/Dropdown</FilterDropdown> */}
</Search>
</SearchSection>
<Cards>
Expand Down
4 changes: 2 additions & 2 deletions apps/BosGenaDrop/widget/CPlanet/DAO/Index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -571,13 +571,13 @@ return (
)}
{state.selectedTab === "members" && (
<Widget
src="agwaze.near/widget/CPlanet.DAO.Members.Index"
src="bos.genadrop.near/widget/CPlanet.DAO.Members.Index"
props={{ daoId }}
/>
)}
{state.selectedTab === "nfts" && (
<Widget
src="agwaze.near/widget/CPlanet.DAO.ProfileNFTs"
src="bos.genadrop.near/widget/CPlanet.DAO.ProfileNFTs"
props={{ daoId }}
/>
)}
Expand Down
8 changes: 4 additions & 4 deletions apps/BosGenaDrop/widget/CPlanet/DAO/Members/Card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ return (
/>
<div className="names">
<h1>
{makeAccountIdShorter(profile.name, 19) ?? "OG Badge (SBT) DAO"}
{makeAccountIdShorter(profile.name ?? daoId, 19)}
</h1>
<span>
@{makeAccountIdShorter(daoId) ?? "@og-sbt.sputnik-dao.near"}
Expand All @@ -246,7 +246,7 @@ return (
<div className="date">
<div>
<p>DAO Member Since</p>
<span>{props.joined ?? "DEC 18, 2018"}</span>
<span>{props.joined ?? "N/A"}</span>
</div>
<div>
<p>Joined CPlanet</p>
Expand All @@ -271,11 +271,11 @@ return (
<h1>Member Stats</h1>
<div className="date">
<div>
<p>{props.totalVotes ?? "9,9999"}</p>
<p>{props.totalVotes ?? "0"}</p>
<h5>Votes Casted</h5>
</div>
<div>
<p>{props.proposal ?? "9,9999"}</p>
<p>{props.proposal ?? "0"}</p>
<h5>Proposal Accepted</h5>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ return (
/>
<div className="name">
<h2>
{makeAccountIdShorter(profile.name, 90) ?? "OG Badge (SBT) DAO"}
{makeAccountIdShorter(profile.name ?? daoId, 90)}
</h2>
<span>{props.userId ?? "@og-sbt.sputnik-dao.near"}</span>
</div>
Expand Down
33 changes: 22 additions & 11 deletions apps/BosGenaDrop/widget/CPlanet/DAO/ProfileNFTs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ const Cards = styled.div`
justify-content: center;
`;

const logo =
"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTrJuxjGxj4QmyreE6ix4ygqm5pK9Nn_rdc8Ndw6lmJcd0SSnm2zBIc2xJ_My1V0WmK2zg&usqp=CAU";


const fetchStoreFrontData = (owner, contractId) => {
const response2 = fetch("https://graph.mintbase.xyz/mainnet", {
method: "POST",
Expand All @@ -47,6 +51,7 @@ const fetchStoreFrontData = (owner, contractId) => {
}
metadata_id
description
owner
media
last_transfer_receipt_id
}
Expand Down Expand Up @@ -75,20 +80,26 @@ return (
title: data.title,
description: data.description,
image: data.media,

price: data.listed,
owner: "",
price: data?.listings?.length
? (data?.listings?.price / 1000000000000000000000000).toFixed(
2
)
owner: data.owner,
chainState: "near",
logo,
onButtonClick: () =>
props.update({
tab: "singleNFT",
contractId: data.nft_contract_id,
tokenId: data.token_id,
chainState: "near",
}),
price: data.listings.length
? (
data.listings.length / 1000000000000000000000000
).toFixed(2)
: null,
isListed: data?.listings?.price ? "LISTED" : "NOT LISTED",
tokenId: data.metadata_id,
isListed: data.listings.length ? "LISTED" : "NOT LISTED",
tokenId: data.token_id,
contractId: data.nft_contract_id,
metadataId: data.metadata_id,
}}
src="jgodwill.near/widget/Mintbase.NFTCard.index"
src="bos.genadrop.near/widget/CPlanet.NFTCard.Index"
/>
</div>
))
Expand Down
6 changes: 3 additions & 3 deletions apps/BosGenaDrop/widget/CPlanet/Home/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ const CTA = styled.div`
img {
width: 250px;
height: 250px;
object-fit: cover; /* Maintain image aspect ratio */
object-fit: cover;
border-radius: 50%;
animation: rotateImage 5s linear infinite; /* Adjust the duration (5s) and timing function (linear) as needed */
animation: rotateImage 5s linear infinite;
}
img:hover {
animation-play-state: paused; /* Pause the rotation on hover */
animation-play-state: paused;
}
@keyframes rotateImage {
from {
Expand Down
2 changes: 1 addition & 1 deletion apps/BosGenaDrop/widget/CPlanet/Home/NFTs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ return (
className="all"
onClick={() => props.update({ tab: "explore" })}
>
Show All NFTs (50)
Show All NFTs (50+)
</a>
</div>
<div className="community">
Expand Down
24 changes: 18 additions & 6 deletions apps/BosGenaDrop/widget/CPlanet/NFTCard/Index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const verifiedCheck = (

const HeaderText = styled.div`
height: 150px;
p {
a {
margin-bottom: 10px;
overflow: hidden;
color: #B0B0B0;
Expand Down Expand Up @@ -184,6 +184,13 @@ const verifiedCheck = (
margin-left: 5px;
}
`;

function makeAccountIdShorter(accountId, shortenLength) {
if (accountId.length > shortenLength) {
return accountId.slice(0, shortenLength) + "...";
}
return accountId;
}

return (
<CardRoot>
Expand All @@ -199,16 +206,21 @@ const verifiedCheck = (
<Bottom>
<CardBody>
<HeaderText>
<h1>{props.title ?? `My NFT CARD`}</h1>
<h1>{makeAccountIdShorter(props?.title ?? "-- No Title --", 35)}</h1>
<Username>
<p>{props.owner ?? "My User"}</p>
<a
target="_blank"
href={`#/bos.genadrop.near/widget/GenaDrop.Profile.Main?accountId=${props?.owner}`}
>
{props?.owner}
</a>
{verifiedCheck}
</Username>
<h3>
{props.description?.substring(
{props?.description ? props.description?.substring(
0,
70
) ??
50
) :
"-- No Description --"
}
</h3>
Expand Down
7 changes: 5 additions & 2 deletions build/BosGenaDrop/src/CPlanet/DAO/Explore.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const Search = styled.div`
gap: 10px;
flex-wrap: wrap;
input {
border-radius: 32px;
border-radius: 8px;
flex-shrink: 0;
height: 48px;
width: 65%;
Expand Down Expand Up @@ -110,6 +110,9 @@ const Explore = styled.div`
flex-direction: column;
align-items: center;
justify-contents: center;
max-width: 1400px;
margin-left: auto;
margin-right: auto;
`;

const NoResult = styled.div`
Expand Down Expand Up @@ -160,7 +163,7 @@ return (
onChange={seachInputHandler}
placeholder="Search for DAOs"
/>
<FilterDropdown>Filter/Dropdown</FilterDropdown>
{/* <FilterDropdown>Filter/Dropdown</FilterDropdown> */}
</Search>
</SearchSection>
<Cards>
Expand Down
4 changes: 2 additions & 2 deletions build/BosGenaDrop/src/CPlanet/DAO/Index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -571,13 +571,13 @@ return (
)}
{state.selectedTab === "members" && (
<Widget
src="agwaze.near/widget/CPlanet.DAO.Members.Index"
src="bos.genadrop.near/widget/CPlanet.DAO.Members.Index"
props={{ daoId }}
/>
)}
{state.selectedTab === "nfts" && (
<Widget
src="agwaze.near/widget/CPlanet.DAO.ProfileNFTs"
src="bos.genadrop.near/widget/CPlanet.DAO.ProfileNFTs"
props={{ daoId }}
/>
)}
Expand Down
8 changes: 4 additions & 4 deletions build/BosGenaDrop/src/CPlanet/DAO/Members/Card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ return (
/>
<div className="names">
<h1>
{makeAccountIdShorter(profile.name, 19) ?? "OG Badge (SBT) DAO"}
{makeAccountIdShorter(profile.name ?? daoId, 19)}
</h1>
<span>
@{makeAccountIdShorter(daoId) ?? "@og-sbt.sputnik-dao.near"}
Expand All @@ -246,7 +246,7 @@ return (
<div className="date">
<div>
<p>DAO Member Since</p>
<span>{props.joined ?? "DEC 18, 2018"}</span>
<span>{props.joined ?? "N/A"}</span>
</div>
<div>
<p>Joined CPlanet</p>
Expand All @@ -271,11 +271,11 @@ return (
<h1>Member Stats</h1>
<div className="date">
<div>
<p>{props.totalVotes ?? "9,9999"}</p>
<p>{props.totalVotes ?? "0"}</p>
<h5>Votes Casted</h5>
</div>
<div>
<p>{props.proposal ?? "9,9999"}</p>
<p>{props.proposal ?? "0"}</p>
<h5>Proposal Accepted</h5>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion build/BosGenaDrop/src/CPlanet/DAO/Members/CouncilCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ return (
/>
<div className="name">
<h2>
{makeAccountIdShorter(profile.name, 90) ?? "OG Badge (SBT) DAO"}
{makeAccountIdShorter(profile.name ?? daoId, 90)}
</h2>
<span>{props.userId ?? "@og-sbt.sputnik-dao.near"}</span>
</div>
Expand Down
33 changes: 22 additions & 11 deletions build/BosGenaDrop/src/CPlanet/DAO/ProfileNFTs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ const Cards = styled.div`
justify-content: center;
`;

const logo =
"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTrJuxjGxj4QmyreE6ix4ygqm5pK9Nn_rdc8Ndw6lmJcd0SSnm2zBIc2xJ_My1V0WmK2zg&usqp=CAU";


const fetchStoreFrontData = (owner, contractId) => {
const response2 = fetch("https://graph.mintbase.xyz/mainnet", {
method: "POST",
Expand All @@ -47,6 +51,7 @@ const fetchStoreFrontData = (owner, contractId) => {
}
metadata_id
description
owner
media
last_transfer_receipt_id
}
Expand Down Expand Up @@ -75,20 +80,26 @@ return (
title: data.title,
description: data.description,
image: data.media,

price: data.listed,
owner: "",
price: data?.listings?.length
? (data?.listings?.price / 1000000000000000000000000).toFixed(
2
)
owner: data.owner,
chainState: "near",
logo,
onButtonClick: () =>
props.update({
tab: "singleNFT",
contractId: data.nft_contract_id,
tokenId: data.token_id,
chainState: "near",
}),
price: data.listings.length
? (
data.listings.length / 1000000000000000000000000
).toFixed(2)
: null,
isListed: data?.listings?.price ? "LISTED" : "NOT LISTED",
tokenId: data.metadata_id,
isListed: data.listings.length ? "LISTED" : "NOT LISTED",
tokenId: data.token_id,
contractId: data.nft_contract_id,
metadataId: data.metadata_id,
}}
src="jgodwill.near/widget/Mintbase.NFTCard.index"
src="bos.genadrop.near/widget/CPlanet.NFTCard.Index"
/>
</div>
))
Expand Down
6 changes: 3 additions & 3 deletions build/BosGenaDrop/src/CPlanet/Home/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ const CTA = styled.div`
img {
width: 250px;
height: 250px;
object-fit: cover; /* Maintain image aspect ratio */
object-fit: cover;
border-radius: 50%;
animation: rotateImage 5s linear infinite; /* Adjust the duration (5s) and timing function (linear) as needed */
animation: rotateImage 5s linear infinite;
}
img:hover {
animation-play-state: paused; /* Pause the rotation on hover */
animation-play-state: paused;
}
@keyframes rotateImage {
from {
Expand Down
2 changes: 1 addition & 1 deletion build/BosGenaDrop/src/CPlanet/Home/NFTs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ return (
className="all"
onClick={() => props.update({ tab: "explore" })}
>
Show All NFTs (50)
Show All NFTs (50+)
</a>
</div>
<div className="community">
Expand Down
Loading

0 comments on commit 5426734

Please sign in to comment.