tags: cleanup

This commit is contained in:
Hunter Miller 2022-08-06 17:18:00 -05:00
parent 9e0c89f9f6
commit 080c0f644c
2 changed files with 5 additions and 5 deletions

View File

@ -7,9 +7,9 @@ import useMedia from '../logic/useMedia';
import { BrowsingRoutes, PostingRoutes } from '../routes'; import { BrowsingRoutes, PostingRoutes } from '../routes';
import { Meta } from './Meta'; import { Meta } from './Meta';
const DesktopNavLink = ({ to, children }: NavLinkProps) => ( const DesktopNavLink = ({ to, children, ...props }: NavLinkProps) => (
<li> <li>
<NavLink to={to} className={({ isActive }) => cn('hover:text-rosy transition-colors', isActive && 'underline')}> <NavLink to={to} className={({ isActive }) => cn('hover:text-rosy transition-colors', isActive && 'underline')} {...props}>
{ children } { children }
</NavLink> </NavLink>
</li> </li>
@ -60,7 +60,7 @@ export const Layout = () => {
) : ( ) : (
<nav className='w-24 mb-10'> <nav className='w-24 mb-10'>
<ul className='font-semibold text-sm space-y-2'> <ul className='font-semibold text-sm space-y-2'>
{Object.entries(BrowsingRoutes).map(([k,v]) => <DesktopNavLink key={v} to={v}>{k}</DesktopNavLink>)} {Object.entries(BrowsingRoutes).map(([k,v]) => <DesktopNavLink key={v} to={v} end={k === 'tags'}>{k}</DesktopNavLink>)}
</ul> </ul>
<hr className='block my-4 border-mauve/60'/> <hr className='block my-4 border-mauve/60'/>
<ul className='font-semibold text-sm space-y-2'> <ul className='font-semibold text-sm space-y-2'>

View File

@ -61,7 +61,7 @@ export const Tag = () => {
<div className={cn('h-[136px] overflow-y-auto', tag && 'mb-12')}> <div className={cn('h-[136px] overflow-y-auto', tag && 'mb-12')}>
<TagCloud tags={tags} /> <TagCloud tags={tags} />
</div> </div>
<header className='flex items-center justify-between'> {tag && <header className='flex items-center justify-between'>
<h1 className='text-2xl font-semibold leading-none'>{tag}</h1> <h1 className='text-2xl font-semibold leading-none'>{tag}</h1>
<Link <Link
to={{ pathname: '/manage-listings/post', search: qs.stringify({ tags: [tag] }) }} to={{ pathname: '/manage-listings/post', search: qs.stringify({ tags: [tag] }) }}
@ -70,7 +70,7 @@ export const Tag = () => {
<PlusSmIcon className='w-5 h-5' /> <PlusSmIcon className='w-5 h-5' />
<span>Add</span> <span>Add</span>
</Link> </Link>
</header> </header>}
{tag && results && <div className='flex justify-end border-t border-zinc-300'> {tag && results && <div className='flex justify-end border-t border-zinc-300'>
<Paginator pages={pages} currentPage={pageInt} linkBuilder={linkBuild} /> <Paginator pages={pages} currentPage={pageInt} linkBuilder={linkBuild} />
</div>} </div>}