mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-08 23:16:54 +00:00
example 主题 调整 tag\category 结构
This commit is contained in:
@@ -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}
|
||||
|
||||
@@ -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
|
||||
})
|
||||
|
||||
|
||||
@@ -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} />
|
||||
|
||||
Reference in New Issue
Block a user