mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-07 15:10:32 +00:00
check
This commit is contained in:
@@ -14,34 +14,30 @@ const TagGroups = ({ tags, className }) => {
|
|||||||
if (!tags) return <></>
|
if (!tags) return <></>
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div id="tags-group" className="dark:border-gray-700 space-y-2">
|
<div id="tags-group" className="dark:border-gray-700 space-y-2">
|
||||||
{tags.map((tag, index) => {
|
{tags.map((tag, index) => {
|
||||||
const selected = currentTag === tag.name
|
const selected = currentTag === tag.name
|
||||||
return (
|
return (
|
||||||
<Link
|
<Link passHref key={index} href={`/tag/${encodeURIComponent(tag.name)}`}
|
||||||
passHref
|
className={'cursor-pointer inline-block whitespace-nowrap'}
|
||||||
key={index}
|
>
|
||||||
href={`/tag/${encodeURIComponent(tag.name)}`}
|
<div className={`${className || ''}
|
||||||
className={'cursor-pointer inline-block whitespace-nowrap'}
|
${selected ? 'text-white bg-blue-600 dark:bg-yellow-600' : ''}
|
||||||
>
|
flex items-center hover:bg-blue-600 dark:hover:bg-yellow-600 hover:scale-110 hover:text-white rounded-lg px-2 py-0.5 duration-150 transition-all`}
|
||||||
<div
|
>
|
||||||
className={`${className || ''}
|
<div className="text-lg">{tag.name} </div>
|
||||||
${selected ? 'text-white bg-blue-600 dark:bg-yellow-600' : ''}
|
{tag.count
|
||||||
flex items-center hover:bg-blue-600 dark:hover:bg-yellow-600 hover:scale-110 hover:text-white rounded-lg px-2 py-0.5 duration-150 transition-all`}
|
? (
|
||||||
>
|
<sup className="relative ml-1">{tag.count}</sup>
|
||||||
<div className="text-lg">{tag.name} </div>
|
)
|
||||||
{tag.count
|
: (
|
||||||
? (
|
<></>
|
||||||
<sup className="relative ml-1">{tag.count}</sup>
|
)}
|
||||||
)
|
</div>
|
||||||
: (
|
</Link>
|
||||||
<></>
|
)
|
||||||
)}
|
})}
|
||||||
</div>
|
</div>
|
||||||
</Link>
|
|
||||||
)
|
|
||||||
})}
|
|
||||||
</div>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user