Skip to content

Commit

Permalink
Merge pull request #233 from GenaDrop/stagging
Browse files Browse the repository at this point in the history
Stagging to main
  • Loading branch information
Ebube111 authored Apr 16, 2024
2 parents 7dd4264 + 8b64ef4 commit 084eabd
Show file tree
Hide file tree
Showing 20 changed files with 562 additions and 428 deletions.
4 changes: 3 additions & 1 deletion apps/BosGenaDrop/widget/Mintbase/App/Hero/Index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,9 @@ function fetchNFTDetails() {
});
}

fetchNFTDetails();
useEffect(() => {
fetchNFTDetails();
}, []);

const HandleUpSlide = () => {
if (page < featuredNFTs.length - 1) {
Expand Down
28 changes: 14 additions & 14 deletions apps/BosGenaDrop/widget/Mintbase/App/Home/HomeContracts.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -315,20 +315,20 @@ const HomeContractsPage = ({ tabs, isDarkModeOn }) => {
fetchOwnedNfts();
}, []);

const HandleUpSlide = () => {
if (page < ownedNFts.length - 1) {
setPage(page + 1);
} else {
setPage(0);
}
};
const HandleDownSlide = () => {
if (page > 0) {
setPage(page - 1);
} else {
setPage(ownedNFts.length - 1);
}
};
// const HandleUpSlide = () => {
// if (page < ownedNFts.length - 1) {
// setPage(page + 1);
// } else {
// setPage(0);
// }
// };
// const HandleDownSlide = () => {
// if (page > 0) {
// setPage(page - 1);
// } else {
// setPage(ownedNFts.length - 1);
// }
// };

return (
<HomeContracts>
Expand Down
23 changes: 17 additions & 6 deletions apps/BosGenaDrop/widget/Mintbase/App/Home/HomePurchase.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,7 @@ const BuyCard = styled.div`
background: ${isDarkModeOn ? "#fff" : "#000"};
margin-right: 10px;
}
button:first-child:hover {
background: #000;
}
button:last-child {
background: ${isDarkModeOn ? "#000" : "#fff"};
color: ${isDarkModeOn ? "#fff" : "#000"};
Expand Down Expand Up @@ -402,6 +400,10 @@ const partners = [
},
];

const { href } = VM.require("buildhub.near/widget/lib.url") || {
href: () => {},
};

return (
<Section>
<HomePurchase>
Expand All @@ -427,10 +429,19 @@ return (
<button>Buy With Crypto</button>
<button>Buy With Credit Card</button>
</div>
<div className="explore">
<Link
to={href({
widgetSrc: "/*__@appAccount__*//widget/Mintbase.App.Index",
params: {
page: "markets",
},
})}
>
<p>Explore Market</p>
</Link>
</div>
</BuyCard>
<div className="explore">
<p>Explore Market</p>
</div>
</>
<div className="leftText">
<div className="sec">
Expand Down
20 changes: 18 additions & 2 deletions apps/BosGenaDrop/widget/Mintbase/App/Home/HomeSmartContract.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,15 @@ return (
<p>Seedless + non custodial + gasless = mass adoption</p>
</div>
<div className="templateButton">
<button>Go to Wallet</button>
<button>
<a
style={{ textDecoration: "none", color: "inherit" }}
href="https://wallet.mintbase.xyz/account/new"
target="_blank"
>
Go to Wallet
</a>
</button>
</div>
</AppContent>
<AppContent>
Expand Down Expand Up @@ -483,7 +491,15 @@ return (
</MinstaSection>
</ContractSection>
<div className="templateButton">
<button>See Templates</button>
<button>
<a
style={{ textDecoration: "none", color: "inherit" }}
href="https://templates.mintbase.xyz/"
target="_blank"
>
See Templates
</a>
</button>
</div>
</AppContent>
</>
Expand Down
12 changes: 7 additions & 5 deletions apps/BosGenaDrop/widget/Mintbase/App/Home/HomeTables.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ ul {
}
`;

const [activeTabIndex, setActiveTabIndex] = useState(0);
const [activeTabIndex, setActiveTabIndex] = useState("top-collections");
const [activeRangeIndex, setActiveRangeIndex] = useState(0);

const handleTabClick = (index) => {
Expand All @@ -63,11 +63,11 @@ return (
tabLabels: ["Top Collections", "Activity"],
customStyle,
isDarkModeOn,
activeIndex: activeTabIndex,
activeTab: activeTabIndex,
onTabChange: handleTabClick,
}}
/>
{activeTabIndex === 0 && (
{/* {activeTabIndex === "activity" && (
<Widget
src={`${accountId}/widget/Mintbase.MbTabs`}
props={{
Expand All @@ -78,11 +78,13 @@ return (
onTabChange: handleRangeClick,
}}
/>
)}
)} */}
</TopTabs>
<Widget
src={`${accountId}/widget/Mintbase.App.Home.${
activeTabIndex === 1 ? "HomeTableActivity" : "HomeTopCollection"
activeTabIndex === "activity"
? "HomeTableActivity"
: "HomeTopCollection"
}`}
props={{ isDarkModeOn }}
/>
Expand Down
10 changes: 10 additions & 0 deletions apps/BosGenaDrop/widget/Mintbase/App/Index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ const config = {
},
default: true,
display: false,
hidden: true,
},
nftDetails: {
path: "/*__@appAccount__*//widget/Mintbase.App.NFTDetails.Index",
blockHeight: "final",
init: {
name: "NFT Page",
},
display: false,
hidden: true,
},
markets: {
path: "/*__@appAccount__*//widget/Mintbase.App.Explore.Index",
Expand Down
Loading

0 comments on commit 084eabd

Please sign in to comment.