Add contract dashboard links to sidebar

This commit is contained in:
Serkan Reis 2022-09-23 16:56:13 +03:00
parent ef69ef561c
commit 67f1285b95
2 changed files with 8 additions and 4 deletions

View File

@ -14,6 +14,9 @@ const routes = [
{ text: 'My Collections', href: `/collections/myCollections/`, isChild: true }, { text: 'My Collections', href: `/collections/myCollections/`, isChild: true },
{ text: 'Collection Actions', href: `/collections/actions/`, isChild: true }, { text: 'Collection Actions', href: `/collections/actions/`, isChild: true },
{ text: 'Contract Dashboards', href: `/contracts/`, isChild: false }, { text: 'Contract Dashboards', href: `/contracts/`, isChild: false },
{ text: 'Minter Contract', href: `/contracts/minter/`, isChild: true },
{ text: 'SG721 Contract', href: `/contracts/sg721/`, isChild: true },
{ text: 'Whitelist Contract', href: `/contracts/whitelist/`, isChild: true },
] ]
export const Sidebar = () => { export const Sidebar = () => {
@ -29,7 +32,6 @@ export const Sidebar = () => {
{/* wallet button */} {/* wallet button */}
<WalletLoader /> <WalletLoader />
{/* main navigation routes */} {/* main navigation routes */}
{routes.map(({ text, href, isChild }) => ( {routes.map(({ text, href, isChild }) => (
<Anchor <Anchor
@ -38,8 +40,11 @@ export const Sidebar = () => {
'px-4 -mx-5 font-extrabold uppercase rounded-lg', // styling 'px-4 -mx-5 font-extrabold uppercase rounded-lg', // styling
'hover:bg-white/5 transition-colors', // hover styling 'hover:bg-white/5 transition-colors', // hover styling
{ 'py-0 ml-2 text-sm font-bold': isChild }, { 'py-0 ml-2 text-sm font-bold': isChild },
{ 'text-gray hover:text-white': router.asPath !== href && isChild }, {
{ 'text-plumbus': router.asPath === href && isChild }, // active route styling 'text-gray hover:text-white':
router.asPath.substring(0, router.asPath.lastIndexOf('/') + 1) !== href && isChild,
},
{ 'text-plumbus': router.asPath.substring(0, router.asPath.lastIndexOf('/') + 1) === href && isChild }, // active route styling
// { 'text-gray-500 pointer-events-none': disabled }, // disabled route styling // { 'text-gray-500 pointer-events-none': disabled }, // disabled route styling
)} )}
href={href} href={href}

View File

@ -68,7 +68,6 @@ const CollectionList: NextPage = () => {
<div className="flex items-center space-x-8"> <div className="flex items-center space-x-8">
<Anchor <Anchor
className="text-xl text-plumbus" className="text-xl text-plumbus"
external
href={`/collections/actions?sg721ContractAddress=${collection.address}&minterContractAddress=${collection.minter}`} href={`/collections/actions?sg721ContractAddress=${collection.address}&minterContractAddress=${collection.minter}`}
> >
<FaSlidersH /> <FaSlidersH />