mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-03 07:26:45 +00:00
feat(start主题 链接设置默认值与多语言化): 可能的站内链接部分使用Link,而非a,使其能正确多语言跳转
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import LazyImage from '@/components/LazyImage'
|
||||
import { siteConfig } from '@/lib/config'
|
||||
import CONFIG from '../config'
|
||||
import Link from 'next/link'
|
||||
|
||||
/**
|
||||
* 英雄大图区块
|
||||
@@ -32,16 +33,16 @@ export const Hero = props => {
|
||||
<ul className='mb-10 flex flex-wrap items-center justify-center gap-5'>
|
||||
{siteConfig('STARTER_HERO_BUTTON_1_TEXT', null, config) && (
|
||||
<li>
|
||||
<a
|
||||
href={siteConfig('STARTER_HERO_BUTTON_1_URL')}
|
||||
<Link
|
||||
href={siteConfig('STARTER_HERO_BUTTON_1_URL', '')}
|
||||
className='inline-flex items-center justify-center rounded-md bg-white px-7 py-[14px] text-center text-base font-medium text-dark shadow-1 transition duration-300 ease-in-out hover:bg-gray-2 hover:text-body-color'>
|
||||
{siteConfig('STARTER_HERO_BUTTON_1_TEXT', null, config)}
|
||||
</a>
|
||||
</Link>
|
||||
</li>
|
||||
)}
|
||||
{siteConfig('STARTER_HERO_BUTTON_2_TEXT', null, config) && (
|
||||
<li>
|
||||
<a
|
||||
<Link
|
||||
href={siteConfig(
|
||||
'STARTER_HERO_BUTTON_2_URL',
|
||||
null,
|
||||
@@ -65,7 +66,7 @@ export const Hero = props => {
|
||||
/>
|
||||
)}
|
||||
{siteConfig('STARTER_HERO_BUTTON_2_TEXT', null, config)}
|
||||
</a>
|
||||
</Link>
|
||||
</li>
|
||||
)}
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user