|
@ -47,11 +47,16 @@ export function SidebarLink({ |
|
|
} |
|
|
} |
|
|
}, [ref, selected]); |
|
|
}, [ref, selected]); |
|
|
|
|
|
|
|
|
|
|
|
let target = ''; |
|
|
|
|
|
if (href.startsWith('https://')) { |
|
|
|
|
|
target = '_blank'; |
|
|
|
|
|
} |
|
|
return ( |
|
|
return ( |
|
|
<Link href={href}> |
|
|
<Link href={href}> |
|
|
<a |
|
|
<a |
|
|
ref={ref} |
|
|
ref={ref} |
|
|
title={title} |
|
|
title={title} |
|
|
|
|
|
target={target} |
|
|
aria-current={selected ? 'page' : undefined} |
|
|
aria-current={selected ? 'page' : undefined} |
|
|
className={cn( |
|
|
className={cn( |
|
|
'p-2 pr-2 w-full rounded-none lg:rounded-r-lg text-left hover:bg-gray-5 dark:hover:bg-gray-80 relative flex items-center justify-between', |
|
|
'p-2 pr-2 w-full rounded-none lg:rounded-r-lg text-left hover:bg-gray-5 dark:hover:bg-gray-80 relative flex items-center justify-between', |
|
|