/* eslint-disable eslint-comments/disable-enable-pair */ /* eslint-disable jsx-a11y/no-noninteractive-tabindex */ import clsx from 'clsx' import { Anchor } from 'components/Anchor' import type { Timezone } from 'contexts/globalSettings' import { setTimezone } from 'contexts/globalSettings' import { setLogItemList, useLogStore } from 'contexts/log' import Link from 'next/link' import { useRouter } from 'next/router' import { useEffect, useState } from 'react' import { FaCog } from 'react-icons/fa' // import BrandText from 'public/brand/brand-text.svg' import { footerLinks, socialsLinks } from 'utils/links' import { useWallet } from 'utils/wallet' import { BADGE_HUB_ADDRESS, BASE_FACTORY_ADDRESS, NETWORK, OPEN_EDITION_FACTORY_ADDRESS } from '../utils/constants' import { Conditional } from './Conditional' import { IncomeDashboardDisclaimer } from './IncomeDashboardDisclaimer' import { LogModal } from './LogModal' import { SettingsModal } from './SettingsModal' import { SidebarLayout } from './SidebarLayout' import { WalletLoader } from './WalletLoader' export const Sidebar = () => { const router = useRouter() const wallet = useWallet() const logs = useLogStore() const [isTallWindow, setIsTallWindow] = useState(false) useEffect(() => { if (logs.itemList.length === 0) return console.log('Stringified log item list: ', JSON.stringify(logs.itemList)) window.localStorage.setItem('logs', JSON.stringify(logs.itemList)) }, [logs]) useEffect(() => { console.log(window.localStorage.getItem('logs')) setLogItemList(JSON.parse(window.localStorage.getItem('logs') || '[]')) setTimezone( (window.localStorage.getItem('timezone') as Timezone) ? (window.localStorage.getItem('timezone') as Timezone) : 'UTC', ) }, []) const handleResize = () => { setIsTallWindow(window.innerHeight > 768) } useEffect(() => { handleResize() window.addEventListener('resize', handleResize) // return () => { // window.removeEventListener('resize', handleResize) // } }, []) return ( {/* Stargaze brand as home button */} [e.preventDefault(), router.push('/brand')]}> Brand Text {/* wallet button */} {/* main navigation routes */}
  • Collections
    • Create a Collection
    • My Collections
    • Collection Actions
    • Snapshots
  • Badges
    • Create a Badge
    • My Badges
    • Badge Actions
  • Tokens
    • Token Factory
    • Airdrop Tokens
  • Contract Dashboards
    • Base Minter Contract
    • Vending Minter Contract
    • Open Edition Minter Contract
    • SG721 Contract
    • Whitelist Contract
    • Badge Hub Contract
    • Splits Contract
    • Royalty Registry
    • Upload Contract
  • Authz
{isTallWindow && (
)} {/* Stargaze network status */} {isTallWindow &&
Network: {wallet.chain.pretty_name}
} {/* footer reference links */}
    {isTallWindow && footerLinks.map(({ href, text }) => (
  • {text}
  • ))}
{/* footer attribution */}
Stargaze Studio {process.env.APP_VERSION}
Powered by{' '} Stargaze
{/* footer social links */}
{socialsLinks.map(({ Icon, href, text }) => ( ))}
) }