fix(landing-layout): links in the user-dropdown not working

We use a custom component for rendering the link (Dropdown.Item), therefore we need to set both passHref and legacyBehavior

See: https://nextjs.org/docs/api-reference/next/link#if-the-child-is-a-custom-component-that-wraps-an-a-tag
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
Erik Michelson 2023-03-24 15:36:29 +01:00 committed by Tilman Vatteroth
parent 620f55d1fe
commit b9f7e12c38

View file

@ -33,13 +33,13 @@ export const UserDropdown: React.FC = () => {
</Dropdown.Toggle>
<Dropdown.Menu className='text-start'>
<Link href={'/n/features'} passHref={true}>
<Link href={'/n/features'} passHref={true} legacyBehavior={true}>
<Dropdown.Item dir='auto' {...cypressId('user-dropdown-features-button')}>
<UiIcon icon={IconLightning} className='mx-2' />
<Trans i18nKey='editor.help.documents.features' />
</Dropdown.Item>
</Link>
<Link href={'/profile'} passHref={true}>
<Link href={'/profile'} passHref={true} legacyBehavior={true}>
<Dropdown.Item dir='auto' {...cypressId('user-dropdown-profile-button')}>
<UiIcon icon={IconPerson} className='mx-2' />
<Trans i18nKey='profile.userProfile' />