mirror of
https://github.com/arthyn/sphinx.git
synced 2024-12-26 01:12:36 +03:00
tags: cleanup
This commit is contained in:
parent
9e0c89f9f6
commit
080c0f644c
@ -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'>
|
||||||
|
@ -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>}
|
||||||
|
Loading…
Reference in New Issue
Block a user