This is an automated email from the ASF dual-hosted git repository.

xiangfu pushed a commit to branch new-site-dev
in repository https://gitbox.apache.org/repos/asf/pinot-site.git


The following commit(s) were added to refs/heads/new-site-dev by this push:
     new 14821e3c Make the banner all clickable (#147)
14821e3c is described below

commit 14821e3c119b9f1bfc27a9a4c9555d02ec18168d
Author: Gio <153032991+gio-start...@users.noreply.github.com>
AuthorDate: Wed Apr 2 23:56:44 2025 +0200

    Make the banner all clickable (#147)
---
 components/AnnouncementBar.tsx | 51 +++++++++++++++++++++---------------------
 1 file changed, 26 insertions(+), 25 deletions(-)

diff --git a/components/AnnouncementBar.tsx b/components/AnnouncementBar.tsx
index 745cd1ae..3f3a91ab 100644
--- a/components/AnnouncementBar.tsx
+++ b/components/AnnouncementBar.tsx
@@ -1,3 +1,4 @@
+/* eslint-disable @next/next/no-img-element */
 import clsx from 'clsx';
 import Link from 'next/link';
 import { ArrowRight } from 'lucide-react';
@@ -29,36 +30,36 @@ export default function AnnouncementBar({
 }: AnnouncementBarProps) {
     return (
         <div className={clsx('z-50', backgroundColor, className)}>
-            <div
-                className={clsx(
-                    'flex items-center justify-center gap-2 p-4 md:gap-4 
md:p-2',
-                    className
-                )}
+            <Link
+                href={buttonHref ? buttonHref : '#'}
+                target={buttonTarget}
+                className={`inline-flex items-center whitespace-nowrap 
text-base font-semibold hover:opacity-80 md:text-base ${buttonColor}`}
             >
-                <div className="ml-5 flex items-center text-left">
-                    {iconSrc && (
-                        <img
-                            src={iconSrc}
-                            alt=""
-                            className="mb-2 mr-3 h-6 w-auto md:mb-0 md:mr-6"
-                        />
+                <div
+                    className={clsx(
+                        'flex items-center justify-center gap-2 p-4 md:gap-4 
md:p-2',
+                        className
                     )}
-                    <span className={`text-base font-semibold md:text-lg 
${textColor}`}>
-                        {text}
-                    </span>
-                </div>
+                >
+                    <div className="ml-5 flex items-center text-left">
+                        {iconSrc && (
+                            <img
+                                src={iconSrc}
+                                alt=""
+                                className="mb-2 mr-3 h-6 w-auto md:mb-0 
md:mr-6"
+                            />
+                        )}
+                        <span className={`text-base font-semibold md:text-lg 
${textColor}`}>
+                            {text}
+                        </span>
+                    </div>
 
-                {buttonHref && (
-                    <Link
-                        href={buttonHref}
-                        target={buttonTarget}
-                        className={`inline-flex items-center whitespace-nowrap 
text-base font-semibold hover:opacity-80 md:text-base ${buttonColor}`}
-                    >
+                    <>
                         {buttonText}
                         {showArrowIcon && <ArrowRight className="ml-1 
inline-block h-5 w-5" />}
-                    </Link>
-                )}
-            </div>
+                    </>
+                </div>
+            </Link>
         </div>
     );
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to