Collection Creation, Sidebar & Dashboard landing page changes for mainnet compatibility
This commit is contained in:
parent
9f167b647f
commit
7c93d7f73f
@ -5,6 +5,7 @@ import { useRouter } from 'next/router'
|
||||
// import BrandText from 'public/brand/brand-text.svg'
|
||||
import { footerLinks, socialsLinks } from 'utils/links'
|
||||
|
||||
import { BASE_FACTORY_ADDRESS } from '../utils/constants'
|
||||
import { SidebarLayout } from './SidebarLayout'
|
||||
import { WalletLoader } from './WalletLoader'
|
||||
|
||||
@ -24,6 +25,11 @@ export const Sidebar = () => {
|
||||
const router = useRouter()
|
||||
const wallet = useWallet()
|
||||
|
||||
let tempRoutes = routes
|
||||
if (BASE_FACTORY_ADDRESS === undefined) {
|
||||
tempRoutes = routes.filter((route) => route.href !== '/contracts/baseMinter/')
|
||||
}
|
||||
|
||||
return (
|
||||
<SidebarLayout>
|
||||
{/* Stargaze brand as home button */}
|
||||
@ -34,7 +40,7 @@ export const Sidebar = () => {
|
||||
{/* wallet button */}
|
||||
<WalletLoader />
|
||||
{/* main navigation routes */}
|
||||
{routes.map(({ text, href, isChild }) => (
|
||||
{tempRoutes.map(({ text, href, isChild }) => (
|
||||
<Anchor
|
||||
key={href}
|
||||
className={clsx(
|
||||
|
||||
@ -782,58 +782,66 @@ const CollectionCreationPage: NextPage = () => {
|
||||
</Alert>
|
||||
</Conditional>
|
||||
</div>
|
||||
<div>
|
||||
<div
|
||||
className={clsx(
|
||||
'mx-10 mt-5',
|
||||
'grid before:absolute relative grid-cols-2 grid-flow-col items-stretch rounded',
|
||||
'before:inset-x-0 before:bottom-0 before:border-white/25',
|
||||
)}
|
||||
>
|
||||
|
||||
{/* To be removed */}
|
||||
<Conditional test={BASE_FACTORY_ADDRESS === undefined}>
|
||||
<div className="mx-10 mt-5" />
|
||||
</Conditional>
|
||||
<Conditional test={BASE_FACTORY_ADDRESS !== undefined}>
|
||||
{/* /To be removed */}
|
||||
<div>
|
||||
<div
|
||||
className={clsx(
|
||||
'isolate space-y-1 border-2',
|
||||
'first-of-type:rounded-tl-md last-of-type:rounded-tr-md',
|
||||
minterType === 'vending' ? 'border-stargaze' : 'border-transparent',
|
||||
minterType !== 'vending' ? 'bg-stargaze/5 hover:bg-stargaze/80' : 'hover:bg-white/5',
|
||||
'mx-10 mt-5',
|
||||
'grid before:absolute relative grid-cols-2 grid-flow-col items-stretch rounded',
|
||||
'before:inset-x-0 before:bottom-0 before:border-white/25',
|
||||
)}
|
||||
>
|
||||
<button
|
||||
className="p-4 w-full h-full text-left bg-transparent"
|
||||
onClick={() => {
|
||||
setMinterType('vending')
|
||||
resetReadyFlags()
|
||||
}}
|
||||
type="button"
|
||||
<div
|
||||
className={clsx(
|
||||
'isolate space-y-1 border-2',
|
||||
'first-of-type:rounded-tl-md last-of-type:rounded-tr-md',
|
||||
minterType === 'vending' ? 'border-stargaze' : 'border-transparent',
|
||||
minterType !== 'vending' ? 'bg-stargaze/5 hover:bg-stargaze/80' : 'hover:bg-white/5',
|
||||
)}
|
||||
>
|
||||
<h4 className="font-bold">Vending Minter</h4>
|
||||
<span className="text-sm text-white/80 line-clamp-2">
|
||||
Vending Minter contract facilitates primary market vending machine style minting
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className={clsx(
|
||||
'isolate space-y-1 border-2',
|
||||
'first-of-type:rounded-tl-md last-of-type:rounded-tr-md',
|
||||
minterType === 'base' ? 'border-stargaze' : 'border-transparent',
|
||||
minterType !== 'base' ? 'bg-stargaze/5 hover:bg-stargaze/80' : 'hover:bg-white/5',
|
||||
)}
|
||||
>
|
||||
<button
|
||||
className="p-4 w-full h-full text-left bg-transparent"
|
||||
onClick={() => {
|
||||
setMinterType('base')
|
||||
resetReadyFlags()
|
||||
}}
|
||||
type="button"
|
||||
<button
|
||||
className="p-4 w-full h-full text-left bg-transparent"
|
||||
onClick={() => {
|
||||
setMinterType('vending')
|
||||
resetReadyFlags()
|
||||
}}
|
||||
type="button"
|
||||
>
|
||||
<h4 className="font-bold">Vending Minter</h4>
|
||||
<span className="text-sm text-white/80 line-clamp-2">
|
||||
Vending Minter contract facilitates primary market vending machine style minting
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className={clsx(
|
||||
'isolate space-y-1 border-2',
|
||||
'first-of-type:rounded-tl-md last-of-type:rounded-tr-md',
|
||||
minterType === 'base' ? 'border-stargaze' : 'border-transparent',
|
||||
minterType !== 'base' ? 'bg-stargaze/5 hover:bg-stargaze/80' : 'hover:bg-white/5',
|
||||
)}
|
||||
>
|
||||
<h4 className="font-bold">Base Minter</h4>
|
||||
<span className="text-sm text-white/80 line-clamp-2">Base Minter contract enables 1/1 minting</span>
|
||||
</button>
|
||||
<button
|
||||
className="p-4 w-full h-full text-left bg-transparent"
|
||||
onClick={() => {
|
||||
setMinterType('base')
|
||||
resetReadyFlags()
|
||||
}}
|
||||
type="button"
|
||||
>
|
||||
<h4 className="font-bold">Base Minter</h4>
|
||||
<span className="text-sm text-white/80 line-clamp-2">Base Minter contract enables 1/1 minting</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Conditional>
|
||||
|
||||
{minterType === 'base' && (
|
||||
<div>
|
||||
|
||||
@ -1,8 +1,11 @@
|
||||
import { Conditional } from 'components/Conditional'
|
||||
import { HomeCard } from 'components/HomeCard'
|
||||
import type { NextPage } from 'next'
|
||||
// import Brand from 'public/brand/brand.svg'
|
||||
import { withMetadata } from 'utils/layout'
|
||||
|
||||
import { BASE_FACTORY_ADDRESS } from '../../utils/constants'
|
||||
|
||||
const HomePage: NextPage = () => {
|
||||
return (
|
||||
<section className="px-8 pt-4 pb-16 mx-auto space-y-8 max-w-4xl">
|
||||
@ -20,13 +23,15 @@ const HomePage: NextPage = () => {
|
||||
<br />
|
||||
|
||||
<div className="grid gap-8 md:grid-cols-2">
|
||||
<HomeCard
|
||||
className="p-4 -m-4 hover:bg-gray-500/10 rounded"
|
||||
link="/contracts/baseMinter"
|
||||
title="Base Minter contract"
|
||||
>
|
||||
Execute messages and run queries on Stargaze's Base Minter contract.
|
||||
</HomeCard>
|
||||
<Conditional test={BASE_FACTORY_ADDRESS !== undefined}>
|
||||
<HomeCard
|
||||
className="p-4 -m-4 hover:bg-gray-500/10 rounded"
|
||||
link="/contracts/baseMinter"
|
||||
title="Base Minter contract"
|
||||
>
|
||||
Execute messages and run queries on Stargaze's Base Minter contract.
|
||||
</HomeCard>
|
||||
</Conditional>
|
||||
<HomeCard
|
||||
className="p-4 -m-4 hover:bg-gray-500/10 rounded"
|
||||
link="/contracts/vendingMinter"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user