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:
giancarlo
2024-04-25 10:57:56 +07:00
parent 944197b84a
commit 19332d124d
12 changed files with 63 additions and 61 deletions

View File

@@ -119,12 +119,12 @@ function InviteNotFoundOrExpired() {
<Trans i18nKey={'teams:inviteNotFoundOrExpiredDescription'} />
</p>
<Link href={pathsConfig.app.home}>
<Button className={'w-full'} variant={'outline'}>
<Button asChild className={'w-full'} variant={'outline'}>
<Link href={pathsConfig.app.home}>
<ArrowLeft className={'mr-2 w-4'} />
<Trans i18nKey={'teams:backToHome'} />
</Button>
</Link>
</Link>
</Button>
</div>
);
}