File tree 2 files changed +10
-8
lines changed
2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 8
8
FaSolidDotCircle ,
9
9
FaSolidFeatherAlt ,
10
10
FaSolidHistory ,
11
- FaSolidSubway ,
12
11
FaSolidUserFriends ,
13
12
IcTwotoneSignpost ,
14
13
IonBook ,
@@ -95,9 +94,9 @@ export const headerMenuConfig: IHeaderMenu[] = [
95
94
} ,
96
95
] ,
97
96
} ,
98
- {
99
- title : '开往' ,
100
- icon : h ( FaSolidSubway ) ,
101
- path : 'https://travellings.link' ,
102
- } ,
97
+ // {
98
+ // title: '开往',
99
+ // icon: h(FaSolidSubway),
100
+ // path: 'https://travellings.link',
101
+ // },
103
102
]
Original file line number Diff line number Diff line change @@ -190,16 +190,19 @@ function AnimatedItem({
190
190
className ?: string
191
191
isActive ?: boolean
192
192
} ) {
193
+ const isExternal = href . startsWith ( 'http' )
194
+ const As = isExternal ? 'a' : Link
193
195
return (
194
196
< div >
195
- < Link
197
+ < As
196
198
href = { href }
197
199
className = { clsxm (
198
200
'relative block whitespace-nowrap px-4 py-2 transition' ,
199
201
isActive ? 'text-accent' : 'hover:text-accent-focus' ,
200
202
isActive ? 'active' : '' ,
201
203
className ,
202
204
) }
205
+ target = { isExternal ? '_blank' : undefined }
203
206
>
204
207
{ children }
205
208
{ isActive && (
@@ -211,7 +214,7 @@ function AnimatedItem({
211
214
layoutId = "active-nav-item"
212
215
/>
213
216
) }
214
- </ Link >
217
+ </ As >
215
218
</ div >
216
219
)
217
220
}
You can’t perform that action at this time.
0 commit comments