mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-06 23:16:52 +00:00
LatestPosts
This commit is contained in:
@@ -10,13 +10,14 @@ import { useRouter } from 'next/router'
|
||||
* @constructor
|
||||
*/
|
||||
const LatestPostsGroup = ({ latestPosts }) => {
|
||||
if (!latestPosts) {
|
||||
return <></>
|
||||
}
|
||||
// 获取当前路径
|
||||
const currentPath = useRouter().asPath
|
||||
const { locale } = useGlobal()
|
||||
|
||||
if (!latestPosts) {
|
||||
return <></>
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="text-sm pb-1 px-2 flex flex-nowrap justify-between">
|
||||
@@ -40,12 +41,11 @@ const LatestPostsGroup = ({ latestPosts }) => {
|
||||
(selected
|
||||
? 'text-white bg-gray-600 '
|
||||
: 'text-gray-500 dark:text-gray-400 ') +
|
||||
' text-xs py-1.5 flex overflow-x-hidden whitespace-nowrap hover:bg-gray-500 px-2 duration-200 w-full ' +
|
||||
' text-xs py-1.5 flex hover:bg-gray-500 px-2 duration-200 w-full ' +
|
||||
'hover:text-white dark:hover:text-white cursor-pointer'
|
||||
}
|
||||
>
|
||||
<i className="mr-2 fas fa-file-alt" />
|
||||
<div className="truncate">{post.title}</div>
|
||||
<li className="text-line-2">{post.title}</li>
|
||||
</div>
|
||||
</a>
|
||||
</Link>
|
||||
|
||||
Reference in New Issue
Block a user