Update nesting of Button and Link components
The Link component is modified to be nested within the Button component in various JSX files. This change was made with the aid of the 'asChild' property, it ensures that the link remains operable even when wrapped by the button, improving the site's semantics and accessibility.
This commit is contained in:
@@ -347,14 +347,14 @@ function FeatureContainer(
|
||||
function MainCallToActionButton() {
|
||||
return (
|
||||
<div className={'flex space-x-2'}>
|
||||
<Link href={'/docs'}>
|
||||
<Button variant={'link'}>
|
||||
<Button asChild variant={'link'}>
|
||||
<Link href={'/docs'}>
|
||||
<Trans i18nKey={'common:documentation'} />
|
||||
</Button>
|
||||
</Link>
|
||||
</Link>
|
||||
</Button>
|
||||
|
||||
<Link href={'/auth/sign-up'}>
|
||||
<Button>
|
||||
<Button asChild>
|
||||
<Link href={'/auth/sign-up'}>
|
||||
<span className={'flex items-center space-x-0.5'}>
|
||||
<span>
|
||||
<Trans i18nKey={'common:getStarted'} />
|
||||
@@ -367,8 +367,8 @@ function MainCallToActionButton() {
|
||||
}
|
||||
/>
|
||||
</span>
|
||||
</Button>
|
||||
</Link>
|
||||
</Link>
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user