Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing mobile icons for new route and default icon #964

Merged
merged 3 commits into from
Nov 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 26 additions & 8 deletions explorer/src/components/layout/SectionHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
'use client'

import { CpuChipIcon, GlobeAltIcon, QueueListIcon, TrophyIcon } from '@heroicons/react/24/outline'
import {
CircleStackIcon,
CodeBracketIcon,
CpuChipIcon,
GiftIcon,
GlobeAltIcon,
IdentificationIcon,
LinkIcon,
QueueListIcon,
TrophyIcon,
} from '@heroicons/react/24/outline'
import { WalletButton } from 'components/WalletButton'
import { WalletSidekick } from 'components/WalletSideKick'
import { ROUTES, Routes } from 'constants/routes'
Expand All @@ -21,16 +31,24 @@ export const SectionHeader: FC = () => {
const domainIcon = useCallback((domain: (typeof ROUTES)[0], isActive: boolean) => {
const className = `w-6 h-6 ${isActive ? 'text-white' : 'text-grayDark'} dark:text-white`
switch (domain.name) {
case Routes.nova:
return <GlobeAltIcon className={className} />
case Routes.consensus:
return <QueueListIcon className={className} />
case Routes.farming:
return <CpuChipIcon className={className} />
case Routes.staking:
return <CircleStackIcon className={className} />
case Routes.leaderboard:
return <TrophyIcon className={className} />
case Routes.staking:
return <CpuChipIcon className={className} />
case Routes.domains:
return <GlobeAltIcon className={className} />
case Routes.nova:
return <CodeBracketIcon className={className} />
case Routes.autoid:
return <IdentificationIcon className={className} />
case Routes.testnetRewards:
return <GiftIcon className={className} />
default:
return null
return <LinkIcon className={className} />
}
}, [])

Expand Down Expand Up @@ -68,8 +86,8 @@ export const SectionHeader: FC = () => {
id='accordion-open'
data-accordion='open'
>
<div className='container mx-auto flex w-full items-center justify-between px-5 py-3 pb-2 md:px-[25px] 2xl:px-0'>
<div className='flex gap-9'>{domainsOptions}</div>
<div className='container mx-auto flex w-full items-center justify-between px-5 pb-2 pt-0 md:px-[25px] 2xl:px-0'>
<div className='flex gap-9 pt-3'>{domainsOptions}</div>
<div className='flex gap-4'>
{!actingAccount ? (
<WalletButton />
Expand Down
Loading