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:
@@ -39,7 +39,7 @@ function AuthCallbackErrorPage({ searchParams }: Params) {
|
||||
</Alert>
|
||||
</div>
|
||||
|
||||
<Button>
|
||||
<Button asChild>
|
||||
<Link href={signInPath}>
|
||||
<Trans i18nKey={'auth:signIn'} />
|
||||
</Link>
|
||||
|
||||
@@ -31,11 +31,11 @@ function PasswordResetPage() {
|
||||
<PasswordResetRequestContainer redirectPath={redirectPath} />
|
||||
|
||||
<div className={'flex justify-center text-xs'}>
|
||||
<Link href={signIn}>
|
||||
<Button variant={'link'} size={'sm'}>
|
||||
<Button asChild variant={'link'} size={'sm'}>
|
||||
<Link href={signIn}>
|
||||
<Trans i18nKey={'auth:passwordRecoveredQuestion'} />
|
||||
</Button>
|
||||
</Link>
|
||||
</Link>
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
|
||||
@@ -33,11 +33,11 @@ function SignInPage() {
|
||||
<SignInMethodsContainer paths={paths} providers={authConfig.providers} />
|
||||
|
||||
<div className={'flex justify-center'}>
|
||||
<Link href={pathsConfig.auth.signUp}>
|
||||
<Button variant={'link'} size={'sm'}>
|
||||
<Button asChild variant={'link'} size={'sm'}>
|
||||
<Link href={pathsConfig.auth.signUp}>
|
||||
<Trans i18nKey={'auth:doNotHaveAccountYet'} />
|
||||
</Button>
|
||||
</Link>
|
||||
</Link>
|
||||
</Button>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -45,11 +45,11 @@ function SignUpPage({ searchParams }: Props) {
|
||||
/>
|
||||
|
||||
<div className={'justify-centers flex'}>
|
||||
<Link href={pathsConfig.auth.signIn}>
|
||||
<Button variant={'link'} size={'sm'}>
|
||||
<Button asChild variant={'link'} size={'sm'}>
|
||||
<Link href={pathsConfig.auth.signIn}>
|
||||
<Trans i18nKey={'auth:alreadyHaveAnAccount'} />
|
||||
</Button>
|
||||
</Link>
|
||||
</Link>
|
||||
</Button>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user