add decodeURI

This commit is contained in:
Roitium. 2024-08-27 21:07:30 +08:00 committed by GitHub
parent 81fd4bef53
commit 396b13a66b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -100,7 +100,7 @@ export default function ListLayoutWithTags({
{sortedTags.map((t) => {
return (
<li key={t} className="my-3">
{pathname.split('/tags/')[1] === slug(t) ? (
{decodeURI(pathname.split('/tags/')[1]) === slug(t) ? (
<h3 className="inline px-3 py-2 text-sm font-bold uppercase text-primary-500">
{`${t} (${tagCounts[t]})`}
</h3>