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

@@ -4,7 +4,7 @@ import Card from './components/Card'
import LayoutBase from './LayoutBase'
export const LayoutCategoryIndex = props => {
const { categories } = props
const { categoryOptions } = props
const { locale } = useGlobal()
return (
<LayoutBase {...props}>
@@ -14,7 +14,7 @@ export const LayoutCategoryIndex = props => {
{locale.COMMON.CATEGORY}:
</div>
<div id="category-list" className="duration-200 flex flex-wrap mx-8">
{categories.map(category => {
{categoryOptions.map(category => {
return (
<Link
key={category.name}

View File

@@ -6,7 +6,7 @@ import React from 'react'
import Link from 'next/link'
export const LayoutTag = (props) => {
const tag = props.tags.find((t) => {
const tag = props.tagOptions.find((t) => {
return t.name === props.tag
})

View File

@@ -4,7 +4,7 @@ import TagItemMini from './components/TagItemMini'
import LayoutBase from './LayoutBase'
export const LayoutTagIndex = props => {
const { tags } = props
const { tagOptions } = props
const { locale } = useGlobal()
return (
<LayoutBase {...props}>
@@ -14,7 +14,7 @@ export const LayoutTagIndex = props => {
{locale.COMMON.TAGS}:
</div>
<div id="tags-list" className="duration-200 flex flex-wrap ml-8">
{tags.map(tag => {
{tagOptions.map(tag => {
return (
<div key={tag.name} className="p-2">
<TagItemMini key={tag.name} tag={tag} />