mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
fukasawa
This commit is contained in:
@@ -4,7 +4,7 @@ import LayoutBase from './LayoutBase'
|
||||
|
||||
export const LayoutCategoryIndex = (props) => {
|
||||
const { locale } = useGlobal()
|
||||
const { categories } = props
|
||||
const { categoryOptions } = props
|
||||
return (
|
||||
<LayoutBase {...props}>
|
||||
<div className='bg-white dark:bg-gray-700 px-10 py-10 shadow'>
|
||||
@@ -12,7 +12,7 @@ export const LayoutCategoryIndex = (props) => {
|
||||
<i className='mr-4 fas fa-th' />{locale.COMMON.CATEGORY}:
|
||||
</div>
|
||||
<div id='category-list' className='duration-200 flex flex-wrap'>
|
||||
{categories && categories.map(category => {
|
||||
{categoryOptions?.map(category => {
|
||||
return (
|
||||
<Link
|
||||
key={category.name}
|
||||
|
||||
@@ -4,12 +4,12 @@ import LayoutBase from './LayoutBase'
|
||||
|
||||
export const LayoutTagIndex = (props) => {
|
||||
const { locale } = useGlobal()
|
||||
const { tags } = props
|
||||
const { tagOptions } = props
|
||||
return <LayoutBase {...props} >
|
||||
<div className='bg-white dark:bg-gray-700 px-10 py-10 shadow'>
|
||||
<div className='dark:text-gray-200 mb-5'><i className='mr-4 fas fa-tag'/>{locale.COMMON.TAGS}:</div>
|
||||
<div id='tags-list' className='duration-200 flex flex-wrap'>
|
||||
{ tags.map(tag => {
|
||||
{ tagOptions.map(tag => {
|
||||
return <div key={tag.name} className='p-2'><TagItem key={tag.name} tag={tag} /></div>
|
||||
}) }
|
||||
</div>
|
||||
|
||||
@@ -9,9 +9,9 @@ import { useRouter } from 'next/router'
|
||||
import DarkModeButton from '@/components/DarkModeButton'
|
||||
|
||||
function AsideLeft (props) {
|
||||
const { tags, currentTag, categories, currentCategory, post, slot, siteInfo } = props
|
||||
const { tagOptions, currentTag, categoryOptions, currentCategory, post, slot, siteInfo } = props
|
||||
const router = useRouter()
|
||||
return <div className='relative w-72 bg-white dark:bg-hexo-black-gray min-h-screen px-10 py-14 hidden lg:block relative z-10'>
|
||||
return <div className='relative w-72 bg-white dark:bg-hexo-black-gray min-h-screen px-10 py-14 hidden lg:block z-10'>
|
||||
<Logo {...props}/>
|
||||
|
||||
<section className='flex flex-col text-gray-600'>
|
||||
@@ -31,12 +31,12 @@ function AsideLeft (props) {
|
||||
|
||||
{router.asPath !== '/tag' && <section className='flex flex-col'>
|
||||
<hr className='w-12 my-8 ' />
|
||||
<GroupTag tags={tags} currentTag={currentTag}/>
|
||||
<GroupTag tags={tagOptions} currentTag={currentTag}/>
|
||||
</section>}
|
||||
|
||||
{router.asPath !== '/category' && <section className='flex flex-col'>
|
||||
<hr className='w-12 my-8 ' />
|
||||
<GroupCategory categories={categories} currentCategory={currentCategory}/>
|
||||
<GroupCategory categories={categoryOptions} currentCategory={currentCategory}/>
|
||||
</section>}
|
||||
|
||||
<section className='flex flex-col'>
|
||||
|
||||
Reference in New Issue
Block a user