example 主题 调整 tag\category 结构

This commit is contained in:
tangly1024.com
2023-02-03 13:46:30 +08:00
parent d93f08fe11
commit 3c280ddf58
13 changed files with 27 additions and 34 deletions

View File

@@ -7,7 +7,7 @@ const ExampleRecentComments = dynamic(() => import('./ExampleRecentComments'))
export const SideBar = (props) => {
const { locale } = useGlobal()
const { latestPosts, categories } = props
const { latestPosts, categoryOptions } = props
return (
<div className="w-full md:w-64 sticky top-8">
@@ -16,7 +16,7 @@ export const SideBar = (props) => {
<div className="p-4">
<ul className="list-reset leading-normal">
{categories?.map(category => {
{categoryOptions?.map(category => {
return (
<Link
key={category.name}
@@ -25,7 +25,7 @@ export const SideBar = (props) => {
legacyBehavior>
<li> <a href="#" className="text-gray-darkest text-sm">{category.name}({category.count})</a></li>
</Link>
);
)
})}
</ul>
</div>
@@ -42,7 +42,7 @@ export const SideBar = (props) => {
<Link key={p.id} href={`/${p.slug}`} passHref legacyBehavior>
<li> <a href="#" className="text-gray-darkest text-sm">{p.title}</a></li>
</Link>
);
)
})}
</ul>
</div>
@@ -61,5 +61,5 @@ export const SideBar = (props) => {
</aside>
</div>
);
)
}