mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-01 15:10:14 +00:00
feature:
网页根据浏览器本地化语言
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import Toc from '@/components/Toc'
|
||||
import React, { useImperativeHandle, useState } from 'react'
|
||||
import { useGlobal } from '@/lib/global'
|
||||
|
||||
/**
|
||||
* 目录抽屉栏
|
||||
@@ -19,7 +20,7 @@ const TocDrawer = ({ post, cRef }) => {
|
||||
const switchVisible = () => {
|
||||
switchShowDrawer(!showDrawer)
|
||||
}
|
||||
|
||||
const { locale } = useGlobal()
|
||||
return <>
|
||||
<div className='fixed top-0 right-0 z-40'>
|
||||
{/* 侧边菜单 */}
|
||||
@@ -28,7 +29,7 @@ const TocDrawer = ({ post, cRef }) => {
|
||||
{post && <>
|
||||
<div
|
||||
className='border-b text-xl font-bold text-black dark:text-white py-3 px-6'>
|
||||
文章目录
|
||||
{locale.COMMON.TABLE_OF_CONTENTS}
|
||||
</div>
|
||||
<Toc toc={post.toc}/>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user