[app/portal][fix] Fix rel and typos

pull/365/head
Terence Ho 3 years ago
parent 6f07df7c85
commit d5cdf7ec52

@ -60,8 +60,12 @@ export default function ProductNavigation({ items, title, titleHref }: Props) {
'block px-4 py-2 text-sm text-slate-700', 'block px-4 py-2 text-sm text-slate-700',
)} )}
href={child.href} href={child.href}
rel={item.target ? 'noopener noreferrer' : ''} rel={
target={item.target}> !child.href.startsWith('/')
? 'noopener noreferrer'
: undefined
}
target={child.target}>
{child.name} {child.name}
</Link> </Link>
)} )}
@ -79,7 +83,9 @@ export default function ProductNavigation({ items, title, titleHref }: Props) {
isActive ? 'border-b-primary-500' : 'border-b-transparent', isActive ? 'border-b-primary-500' : 'border-b-transparent',
)} )}
href={item.href} href={item.href}
rel={item.target ? 'noopener noreferrer' : ''} rel={
!item.href.startsWith('/') ? 'noopener noreferrer' : undefined
}
target={item.target}> target={item.target}>
{item.name} {item.name}
{item.target ? ( {item.target ? (

Loading…
Cancel
Save