mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-17 15:09:31 +00:00
@@ -3,7 +3,7 @@ import { siteConfig } from '@/lib/config'
|
||||
import { useGlobal } from '@/lib/global'
|
||||
import algoliasearch from 'algoliasearch'
|
||||
import throttle from 'lodash/throttle'
|
||||
import Link from 'next/link'
|
||||
import SmartLink from '@/components/SmartLink'
|
||||
import { useRouter } from 'next/router'
|
||||
import {
|
||||
Fragment,
|
||||
@@ -356,7 +356,7 @@ function TagGroups() {
|
||||
<div id='tags-group' className='dark:border-gray-700 space-y-2'>
|
||||
{firstTenTags?.map((tag, index) => {
|
||||
return (
|
||||
<Link
|
||||
<SmartLink
|
||||
passHref
|
||||
key={index}
|
||||
href={`/tag/${encodeURIComponent(tag.name)}`}
|
||||
@@ -372,7 +372,7 @@ function TagGroups() {
|
||||
<></>
|
||||
)}
|
||||
</div>
|
||||
</Link>
|
||||
</SmartLink>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@ import useWindowSize from '@/hooks/useWindowSize'
|
||||
import { siteConfig } from '@/lib/config'
|
||||
import { useGlobal } from '@/lib/global'
|
||||
import { THEMES, saveDarkModeToLocalStorage } from '@/themes/theme'
|
||||
import Link from 'next/link'
|
||||
import SmartLink from '@/components/SmartLink'
|
||||
import { useRouter } from 'next/router'
|
||||
import { useEffect, useLayoutEffect, useRef, useState } from 'react'
|
||||
|
||||
@@ -198,23 +198,23 @@ export default function CustomContextMenu(props) {
|
||||
)}
|
||||
|
||||
{CUSTOM_RIGHT_CLICK_CONTEXT_MENU_CATEGORY && (
|
||||
<Link
|
||||
<SmartLink
|
||||
href='/category'
|
||||
title={locale.MENU.CATEGORY}
|
||||
className='w-full px-2 h-10 flex justify-start items-center flex-nowrap cursor-pointer hover:bg-blue-600 hover:text-white rounded-lg duration-200 transition-all'>
|
||||
<i className='fa-solid fa-square-minus mr-2' />
|
||||
<div className='whitespace-nowrap'>{locale.MENU.CATEGORY}</div>
|
||||
</Link>
|
||||
</SmartLink>
|
||||
)}
|
||||
|
||||
{CUSTOM_RIGHT_CLICK_CONTEXT_MENU_TAG && (
|
||||
<Link
|
||||
<SmartLink
|
||||
href='/tag'
|
||||
title={locale.MENU.TAGS}
|
||||
className='w-full px-2 h-10 flex justify-start items-center flex-nowrap cursor-pointer hover:bg-blue-600 hover:text-white rounded-lg duration-200 transition-all'>
|
||||
<i className='fa-solid fa-tag mr-2' />
|
||||
<div className='whitespace-nowrap'>{locale.MENU.TAGS}</div>
|
||||
</Link>
|
||||
</SmartLink>
|
||||
)}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { siteConfig } from '@/lib/config'
|
||||
import Link from 'next/link'
|
||||
import SmartLink from '@/components/SmartLink'
|
||||
import { useRouter } from 'next/router'
|
||||
/**
|
||||
* 跳转仪表盘的按钮
|
||||
@@ -24,7 +24,7 @@ export default function DashboardButton({ className }) {
|
||||
<button
|
||||
type='button'
|
||||
className={`${className || ''} text-white bg-gray-800 hover:bg-gray-900 hover:ring-4 hover:ring-gray-300 focus:outline-none focus:ring-4 focus:ring-gray-300 font-medium rounded-lg text-sm px-5 py-2 me-2 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-700 dark:border-gray-700`}>
|
||||
<Link href='/dashboard'>仪表盘</Link>
|
||||
<SmartLink href='/dashboard'>仪表盘</SmartLink>
|
||||
</button>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import LazyImage from '@/components/LazyImage'
|
||||
import { useGlobal } from '@/lib/global'
|
||||
import formatDate from '@/lib/utils/formatDate'
|
||||
import Link from 'next/link'
|
||||
import SmartLink from '@/components/SmartLink'
|
||||
import DashboardSignOutButton from './DashboardSignOutButton'
|
||||
|
||||
/**
|
||||
@@ -25,11 +25,11 @@ export default function DashboardHeader() {
|
||||
<div class='font-medium dark:text-white'>
|
||||
<div className='flex items-center gap-x-2'>
|
||||
<span>{user?.fullName}</span>
|
||||
<Link href='/dashboard/membership'>
|
||||
<SmartLink href='/dashboard/membership'>
|
||||
<span class='bg-gray-100 text-gray-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-gray-700 dark:text-gray-300'>
|
||||
普通用户
|
||||
</span>
|
||||
</Link>
|
||||
</SmartLink>
|
||||
</div>
|
||||
<div className='text-sm text-gray-500 gap-x-2 flex dark:text-gray-400'>
|
||||
<span>{user?.username}</span>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Link from 'next/link'
|
||||
import SmartLink from '@/components/SmartLink'
|
||||
|
||||
/**
|
||||
* 联盟行销
|
||||
@@ -140,11 +140,11 @@ export default function DashboardItemAffliate() {
|
||||
for='remember'
|
||||
className='ms-2 text-sm font-medium text-gray-900 dark:text-gray-300'>
|
||||
我以阅读并同意{' '}
|
||||
<Link
|
||||
<SmartLink
|
||||
href='/terms-of-use'
|
||||
className='text-blue-600 hover:underline dark:text-blue-500'>
|
||||
服务协议
|
||||
</Link>
|
||||
</SmartLink>
|
||||
.
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Link from 'next/link'
|
||||
import SmartLink from '@/components/SmartLink'
|
||||
|
||||
/**
|
||||
* 仪表盘菜单
|
||||
@@ -43,12 +43,12 @@ export default function DashboardMenuList() {
|
||||
className={`rounded-lg cursor-pointer block ${
|
||||
isActive ? 'bg-blue-100 text-blue-600' : 'hover:bg-gray-100'
|
||||
}`}>
|
||||
<Link
|
||||
<SmartLink
|
||||
href={item.href}
|
||||
className='block py-2 px-4 w-full items-center justify-center'>
|
||||
<i className={`${item.icon} w-6 mr-2`}></i>
|
||||
<span className='whitespace-nowrap'>{item.title}</span>
|
||||
</Link>
|
||||
</SmartLink>
|
||||
</li>
|
||||
)
|
||||
})}
|
||||
|
||||
Reference in New Issue
Block a user