@@ -5,6 +5,7 @@ import Link from 'next/link';
5
5
import { usePathname } from 'next/navigation' ;
6
6
import clsx from 'clsx' ;
7
7
import { AnimatePresence , motion , useIsPresent } from 'framer-motion' ;
8
+ import { ArrowTopRightOnSquareIcon } from '@heroicons/react/20/solid' ;
8
9
9
10
import { useIsInsideMobileNavigation } from '@/components/MobileNavigation' ;
10
11
import { useSectionStore } from '@/components/SectionProvider' ;
@@ -29,7 +30,7 @@ function TopLevelNavItem({href, children}) {
29
30
) ;
30
31
}
31
32
32
- function NavLink ( { href, tag, active, isAnchorLink = false , children} ) {
33
+ function NavLink ( { href, tag, active, isAnchorLink = false , external , children} ) {
33
34
return (
34
35
< Link
35
36
href = { href }
@@ -42,7 +43,10 @@ function NavLink({href, tag, active, isAnchorLink = false, children}) {
42
43
'text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white' ,
43
44
) }
44
45
>
45
- < span className = "truncate" > { children } </ span >
46
+ < span className = "truncate inline-flex" >
47
+ { children }
48
+ { external && < ArrowTopRightOnSquareIcon className = "w-4 h-4 mt-1 ml-1" /> }
49
+ </ span >
46
50
{ tag && (
47
51
< Tag variant = "small" color = "zinc" >
48
52
{ tag }
@@ -145,7 +149,7 @@ function NavigationGroup({group, className}) {
145
149
< ul role = "list" className = "border-l border-transparent" >
146
150
{ group . links . map ( ( link ) => (
147
151
< motion . li key = { link . href } layout = "position" className = "relative" >
148
- < NavLink href = { link . href } active = { link . href === pathname } >
152
+ < NavLink active = { link . href === pathname } { ... link } >
149
153
{ link . title }
150
154
</ NavLink >
151
155
< AnimatePresence mode = "popLayout" initial = { false } >
0 commit comments