From 19332d124d565a78c9302991b050ee448fb4f7a9 Mon Sep 17 00:00:00 2001 From: giancarlo Date: Thu, 25 Apr 2024 10:57:56 +0700 Subject: [PATCH] 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. --- .../site-header-account-section.tsx | 16 +++++++------- .../_components/site-navigation.tsx | 2 +- apps/web/app/(marketing)/faq/page.tsx | 8 +++---- apps/web/app/(marketing)/page.tsx | 16 +++++++------- apps/web/app/auth/callback/error/page.tsx | 2 +- apps/web/app/auth/password-reset/page.tsx | 8 +++---- apps/web/app/auth/sign-in/page.tsx | 8 +++---- apps/web/app/auth/sign-up/page.tsx | 8 +++---- apps/web/app/join/page.tsx | 8 +++---- apps/web/app/not-found.tsx | 8 +++---- .../src/components/password-sign-in-form.tsx | 19 +++++++++-------- packages/ui/src/makerkit/sidebar.tsx | 21 ++++++++++--------- 12 files changed, 63 insertions(+), 61 deletions(-) diff --git a/apps/web/app/(marketing)/_components/site-header-account-section.tsx b/apps/web/app/(marketing)/_components/site-header-account-section.tsx index 7c10175cc..0f1f4c030 100644 --- a/apps/web/app/(marketing)/_components/site-header-account-section.tsx +++ b/apps/web/app/(marketing)/_components/site-header-account-section.tsx @@ -71,15 +71,15 @@ function AuthButtons() {
- - - + +
- - - + + ); } diff --git a/apps/web/app/(marketing)/_components/site-navigation.tsx b/apps/web/app/(marketing)/_components/site-navigation.tsx index d51593951..c69c88369 100644 --- a/apps/web/app/(marketing)/_components/site-navigation.tsx +++ b/apps/web/app/(marketing)/_components/site-navigation.tsx @@ -70,7 +70,7 @@ function MobileDropdown() { const className = 'flex w-full h-full items-center'; return ( - + diff --git a/apps/web/app/(marketing)/faq/page.tsx b/apps/web/app/(marketing)/faq/page.tsx index a7aeeb686..da6f02534 100644 --- a/apps/web/app/(marketing)/faq/page.tsx +++ b/apps/web/app/(marketing)/faq/page.tsx @@ -86,15 +86,15 @@ async function FAQPage() {
- - - + +
diff --git a/apps/web/app/(marketing)/page.tsx b/apps/web/app/(marketing)/page.tsx index 4999207df..5cd079a7f 100644 --- a/apps/web/app/(marketing)/page.tsx +++ b/apps/web/app/(marketing)/page.tsx @@ -347,14 +347,14 @@ function FeatureContainer( function MainCallToActionButton() { return (
- - - + + - - - + +
); } diff --git a/apps/web/app/auth/callback/error/page.tsx b/apps/web/app/auth/callback/error/page.tsx index 672e7e4fb..1c147f838 100644 --- a/apps/web/app/auth/callback/error/page.tsx +++ b/apps/web/app/auth/callback/error/page.tsx @@ -39,7 +39,7 @@ function AuthCallbackErrorPage({ searchParams }: Params) { - - + + diff --git a/apps/web/app/auth/sign-in/page.tsx b/apps/web/app/auth/sign-in/page.tsx index 587eb8178..28aa7234f 100644 --- a/apps/web/app/auth/sign-in/page.tsx +++ b/apps/web/app/auth/sign-in/page.tsx @@ -33,11 +33,11 @@ function SignInPage() {
- - - + +
); diff --git a/apps/web/app/auth/sign-up/page.tsx b/apps/web/app/auth/sign-up/page.tsx index 7ce1f8b94..a8e4317fb 100644 --- a/apps/web/app/auth/sign-up/page.tsx +++ b/apps/web/app/auth/sign-up/page.tsx @@ -45,11 +45,11 @@ function SignUpPage({ searchParams }: Props) { />
- - - + +
); diff --git a/apps/web/app/join/page.tsx b/apps/web/app/join/page.tsx index 0dedd984d..6acf94a7f 100644 --- a/apps/web/app/join/page.tsx +++ b/apps/web/app/join/page.tsx @@ -119,12 +119,12 @@ function InviteNotFoundOrExpired() {

- - - + + ); } diff --git a/apps/web/app/not-found.tsx b/apps/web/app/not-found.tsx index 976b387e6..4414cb26b 100644 --- a/apps/web/app/not-found.tsx +++ b/apps/web/app/not-found.tsx @@ -56,13 +56,13 @@ const NotFoundPage = async () => {

- - - + + diff --git a/packages/features/auth/src/components/password-sign-in-form.tsx b/packages/features/auth/src/components/password-sign-in-form.tsx index afbcfe58d..c8181f40e 100644 --- a/packages/features/auth/src/components/password-sign-in-form.tsx +++ b/packages/features/auth/src/components/password-sign-in-form.tsx @@ -88,16 +88,17 @@ export const PasswordSignInForm: React.FC<{ - - - + + )} /> diff --git a/packages/ui/src/makerkit/sidebar.tsx b/packages/ui/src/makerkit/sidebar.tsx index ce55d6d52..8113c49d0 100644 --- a/packages/ui/src/makerkit/sidebar.tsx +++ b/packages/ui/src/makerkit/sidebar.tsx @@ -164,14 +164,15 @@ export function SidebarItem({ const size = collapsed ? 'icon' : 'sm'; return ( - - - + + ); }