From bf51e1da1f7a07299982c8543983e57251842af2 Mon Sep 17 00:00:00 2001 From: 29deepanshutyagi <29deepanshutyagi@gmail.com> Date: Wed, 1 Jan 2025 22:53:42 +0530 Subject: [PATCH 1/9] Fixes issue 3158 --- components/sponsors/GoldSponsors.tsx | 6 +++--- components/sponsors/SilverSponsors.tsx | 6 +++--- components/sponsors/SponsorImage.tsx | 26 ++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 6 deletions(-) create mode 100644 components/sponsors/SponsorImage.tsx diff --git a/components/sponsors/GoldSponsors.tsx b/components/sponsors/GoldSponsors.tsx index 3729ffcc7e09..f6f05ffe8b8b 100644 --- a/components/sponsors/GoldSponsors.tsx +++ b/components/sponsors/GoldSponsors.tsx @@ -1,6 +1,6 @@ import React from 'react'; - import { goldSponsors } from './GoldSponsorsList'; +import SponsorImage from './SponsorImage'; interface GoldSponsorsProps { className?: string; @@ -26,10 +26,10 @@ export default function GoldSponsors({ className = '' }: GoldSponsorsProps): Rea rel='noopener noreferrer' data-testid='GoldSponsors-link' > - {sponsor.altText} diff --git a/components/sponsors/SilverSponsors.tsx b/components/sponsors/SilverSponsors.tsx index 4a737aef7df9..4a09029c1eaf 100644 --- a/components/sponsors/SilverSponsors.tsx +++ b/components/sponsors/SilverSponsors.tsx @@ -1,6 +1,6 @@ import React from 'react'; - import { Silversponsors } from './SilverSponsorsList'; +import SponsorImage from './SponsorImage'; interface SilverSponsorsProps { className: string; @@ -26,10 +26,10 @@ export default function SilverSponsors({ className = '' }: SilverSponsorsProps): rel='noopener noreferrer' data-testid='SilverSponsors-link' > - {sponsor.altText} diff --git a/components/sponsors/SponsorImage.tsx b/components/sponsors/SponsorImage.tsx new file mode 100644 index 000000000000..bac0d92762c3 --- /dev/null +++ b/components/sponsors/SponsorImage.tsx @@ -0,0 +1,26 @@ +import React from 'react'; +import { twMerge } from 'tailwind-merge'; + +interface SponsorImageProps { + src: string; + alt?: string; + className?: string; +} + +/** + * A component that displays sponsor logos with consistent dimensions + */ +export default function SponsorImage({ src, alt = 'Sponsor logo', className }: SponsorImageProps) { + return ( +
+ {alt} +
+ ); +} \ No newline at end of file From 16775b69b59159173bb0878cb7be2e53549ca3b4 Mon Sep 17 00:00:00 2001 From: 29deepanshutyagi <29deepanshutyagi@gmail.com> Date: Wed, 1 Jan 2025 23:04:26 +0530 Subject: [PATCH 2/9] Refactor sponsor components for consistency --- components/sponsors/GoldSponsors.tsx | 17 ++++++++++------- components/sponsors/SilverSponsors.tsx | 17 ++++++++++------- components/sponsors/SponsorImage.tsx | 12 ++++++++---- 3 files changed, 28 insertions(+), 18 deletions(-) diff --git a/components/sponsors/GoldSponsors.tsx b/components/sponsors/GoldSponsors.tsx index f6f05ffe8b8b..3e2a84179474 100644 --- a/components/sponsors/GoldSponsors.tsx +++ b/components/sponsors/GoldSponsors.tsx @@ -1,4 +1,5 @@ import React from 'react'; + import { goldSponsors } from './GoldSponsorsList'; import SponsorImage from './SponsorImage'; @@ -13,24 +14,26 @@ interface GoldSponsorsProps { * @param {string} props.className - Additional CSS classes for styling. * @param {boolean} props.showSupportBanner - Indicates whether support banner should be displayed. */ -export default function GoldSponsors({ className = '' }: GoldSponsorsProps): React.ReactNode { +export default function GoldSponsors({ + className = '', +}: GoldSponsorsProps): React.ReactNode { return (
-
+
{goldSponsors.map((sponsor, index) => ( ))} diff --git a/components/sponsors/SilverSponsors.tsx b/components/sponsors/SilverSponsors.tsx index 4a09029c1eaf..93d448ea7c47 100644 --- a/components/sponsors/SilverSponsors.tsx +++ b/components/sponsors/SilverSponsors.tsx @@ -1,4 +1,5 @@ import React from 'react'; + import { Silversponsors } from './SilverSponsorsList'; import SponsorImage from './SponsorImage'; @@ -13,24 +14,26 @@ interface SilverSponsorsProps { * @param {string} props.className - Additional CSS classes for styling. * @param {boolean} props.showSupportBanner - Indicates whether support banner should be displayed. */ -export default function SilverSponsors({ className = '' }: SilverSponsorsProps): React.ReactNode { +export default function SilverSponsors({ + className = '', +}: SilverSponsorsProps): React.ReactNode { return (
-
+
{Silversponsors.map((sponsor, index) => ( ))} diff --git a/components/sponsors/SponsorImage.tsx b/components/sponsors/SponsorImage.tsx index bac0d92762c3..243396385a7f 100644 --- a/components/sponsors/SponsorImage.tsx +++ b/components/sponsors/SponsorImage.tsx @@ -10,17 +10,21 @@ interface SponsorImageProps { /** * A component that displays sponsor logos with consistent dimensions */ -export default function SponsorImage({ src, alt = 'Sponsor logo', className }: SponsorImageProps) { +export default function SponsorImage({ + src, + alt = 'Sponsor logo', + className, +}: SponsorImageProps) { return ( -
+
{alt}
); -} \ No newline at end of file +} From 178d7547255a2554ec10452a1de6373408b77118 Mon Sep 17 00:00:00 2001 From: 29deepanshutyagi <29deepanshutyagi@gmail.com> Date: Wed, 1 Jan 2025 23:14:38 +0530 Subject: [PATCH 3/9] Refactor sponsor components for consistency --- components/sponsors/GoldSponsors.tsx | 16 +++++++--------- components/sponsors/SilverSponsors.tsx | 16 +++++++--------- components/sponsors/SponsorImage.tsx | 17 +++-------------- 3 files changed, 17 insertions(+), 32 deletions(-) diff --git a/components/sponsors/GoldSponsors.tsx b/components/sponsors/GoldSponsors.tsx index 3e2a84179474..f7155ba4b4ec 100644 --- a/components/sponsors/GoldSponsors.tsx +++ b/components/sponsors/GoldSponsors.tsx @@ -14,26 +14,24 @@ interface GoldSponsorsProps { * @param {string} props.className - Additional CSS classes for styling. * @param {boolean} props.showSupportBanner - Indicates whether support banner should be displayed. */ -export default function GoldSponsors({ - className = '', -}: GoldSponsorsProps): React.ReactNode { +export default function GoldSponsors({ className = '' }: GoldSponsorsProps): React.ReactNode { return (
-
+
{goldSponsors.map((sponsor, index) => ( ))} diff --git a/components/sponsors/SilverSponsors.tsx b/components/sponsors/SilverSponsors.tsx index 93d448ea7c47..f1276bed8b13 100644 --- a/components/sponsors/SilverSponsors.tsx +++ b/components/sponsors/SilverSponsors.tsx @@ -14,26 +14,24 @@ interface SilverSponsorsProps { * @param {string} props.className - Additional CSS classes for styling. * @param {boolean} props.showSupportBanner - Indicates whether support banner should be displayed. */ -export default function SilverSponsors({ - className = '', -}: SilverSponsorsProps): React.ReactNode { +export default function SilverSponsors({ className = '' }: SilverSponsorsProps): React.ReactNode { return (
-
+
{Silversponsors.map((sponsor, index) => ( ))} diff --git a/components/sponsors/SponsorImage.tsx b/components/sponsors/SponsorImage.tsx index 243396385a7f..e51e179e8330 100644 --- a/components/sponsors/SponsorImage.tsx +++ b/components/sponsors/SponsorImage.tsx @@ -10,21 +10,10 @@ interface SponsorImageProps { /** * A component that displays sponsor logos with consistent dimensions */ -export default function SponsorImage({ - src, - alt = 'Sponsor logo', - className, -}: SponsorImageProps) { +export default function SponsorImage({ src, alt = 'Sponsor logo', className }: SponsorImageProps) { return ( -
- {alt} +
+ {alt}
); } From 638d5b427c687a3a24caebbc746fe2bf5ae14a7a Mon Sep 17 00:00:00 2001 From: 29deepanshutyagi <29deepanshutyagi@gmail.com> Date: Wed, 1 Jan 2025 23:17:24 +0530 Subject: [PATCH 4/9] Refactor GoldSponsors component to fix sponsor website links --- components/sponsors/GoldSponsors.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/sponsors/GoldSponsors.tsx b/components/sponsors/GoldSponsors.tsx index f7155ba4b4ec..da8b687c2c6d 100644 --- a/components/sponsors/GoldSponsors.tsx +++ b/components/sponsors/GoldSponsors.tsx @@ -21,7 +21,7 @@ export default function GoldSponsors({ className = '' }: GoldSponsorsProps): Rea {goldSponsors.map((sponsor, index) => ( Date: Wed, 1 Jan 2025 23:17:55 +0530 Subject: [PATCH 5/9] Refactor GoldSponsors component to fix sponsor website links --- components/sponsors/GoldSponsors.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/sponsors/GoldSponsors.tsx b/components/sponsors/GoldSponsors.tsx index da8b687c2c6d..f7155ba4b4ec 100644 --- a/components/sponsors/GoldSponsors.tsx +++ b/components/sponsors/GoldSponsors.tsx @@ -21,7 +21,7 @@ export default function GoldSponsors({ className = '' }: GoldSponsorsProps): Rea {goldSponsors.map((sponsor, index) => ( Date: Thu, 16 Jan 2025 14:42:03 +0530 Subject: [PATCH 6/9] Refactor sponsor components to use PlatinumSponsors instead of Sponsors --- components/MDX/MDX.tsx | 2 +- components/sponsors/{Sponsors.tsx => PlatinumSponsors.tsx} | 5 +++-- .../sponsors/{SponsorsList.ts => PlatinumSponsorsList.ts} | 0 pages/[lang]/index.tsx | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) rename components/sponsors/{Sponsors.tsx => PlatinumSponsors.tsx} (93%) rename components/sponsors/{SponsorsList.ts => PlatinumSponsorsList.ts} (100%) diff --git a/components/MDX/MDX.tsx b/components/MDX/MDX.tsx index c3ead83b61b3..773f5953e040 100644 --- a/components/MDX/MDX.tsx +++ b/components/MDX/MDX.tsx @@ -37,7 +37,7 @@ import Row from '../layout/Row'; import NewsletterSubscribe from '../NewsletterSubscribe'; import Profiles from '../Profiles'; import Remember from '../Remember'; -import Sponsors from '../sponsors/Sponsors'; +import Sponsors from '../sponsors/PlatinumSponsors'; import Warning from '../Warning'; import { Table, TableBody, TableCell, TableHeader, TableRow, Thead } from './MDXTable'; diff --git a/components/sponsors/Sponsors.tsx b/components/sponsors/PlatinumSponsors.tsx similarity index 93% rename from components/sponsors/Sponsors.tsx rename to components/sponsors/PlatinumSponsors.tsx index fd5aff751179..cb83b776421c 100644 --- a/components/sponsors/Sponsors.tsx +++ b/components/sponsors/PlatinumSponsors.tsx @@ -1,6 +1,7 @@ import React from 'react'; -import { sponsors } from './SponsorsList'; +import { sponsors } from './PlatinumSponsorsList'; +import SponsorImage from './SponsorImage'; interface SponsorsProps { className: string; @@ -26,7 +27,7 @@ export default function Sponsors({ className = '', showSupportBanner = true }: S rel='noopener noreferrer' data-testid='Sponsors-link' > - {sponsor.altText} Date: Thu, 16 Jan 2025 14:51:26 +0530 Subject: [PATCH 7/9] prettier formatting of these files, --- components/sponsors/GoldSponsors.tsx | 16 +++++----- components/sponsors/GoldSponsorsList.ts | 4 +-- components/sponsors/PlatinumSponsors.tsx | 35 ++++++++++++--------- components/sponsors/PlatinumSponsorsList.ts | 8 ++--- components/sponsors/SilverSponsors.tsx | 16 +++++----- components/sponsors/SilverSponsorsList.ts | 19 +++++------ components/sponsors/SponsorImage.tsx | 17 ++++++++-- 7 files changed, 69 insertions(+), 46 deletions(-) diff --git a/components/sponsors/GoldSponsors.tsx b/components/sponsors/GoldSponsors.tsx index f7155ba4b4ec..3e2a84179474 100644 --- a/components/sponsors/GoldSponsors.tsx +++ b/components/sponsors/GoldSponsors.tsx @@ -14,24 +14,26 @@ interface GoldSponsorsProps { * @param {string} props.className - Additional CSS classes for styling. * @param {boolean} props.showSupportBanner - Indicates whether support banner should be displayed. */ -export default function GoldSponsors({ className = '' }: GoldSponsorsProps): React.ReactNode { +export default function GoldSponsors({ + className = '', +}: GoldSponsorsProps): React.ReactNode { return (
-
+
{goldSponsors.map((sponsor, index) => ( ))} diff --git a/components/sponsors/GoldSponsorsList.ts b/components/sponsors/GoldSponsorsList.ts index a46f464d7928..aa8f3759a173 100644 --- a/components/sponsors/GoldSponsorsList.ts +++ b/components/sponsors/GoldSponsorsList.ts @@ -6,6 +6,6 @@ export const goldSponsors: SponsorType[] = [ website: 'https://www.ibm.com', imageSrc: '/img/sponsors/ibm.png', altText: 'IBM', - imageClass: 'inline-block px-4 sm:h-14' - } + imageClass: 'inline-block px-4 sm:h-14', + }, ]; diff --git a/components/sponsors/PlatinumSponsors.tsx b/components/sponsors/PlatinumSponsors.tsx index cb83b776421c..659b42550704 100644 --- a/components/sponsors/PlatinumSponsors.tsx +++ b/components/sponsors/PlatinumSponsors.tsx @@ -14,37 +14,44 @@ interface SponsorsProps { * @param {string} props.className - Additional CSS classes for styling. * @param {boolean} props.showSupportBanner - Indicates whether support banner should be displayed. */ -export default function Sponsors({ className = '', showSupportBanner = true }: SponsorsProps): React.ReactNode { +export default function Sponsors({ + className = '', + showSupportBanner = true, +}: SponsorsProps): React.ReactNode { return (
-
    +
      {sponsors.map((sponsor, index) => ( -
    • +
    • ))}
    {showSupportBanner && ( -
    - Want to become a sponsor?{' '} +
    + Want to become a sponsor?{' '} Support us! diff --git a/components/sponsors/PlatinumSponsorsList.ts b/components/sponsors/PlatinumSponsorsList.ts index bdc75f3a7141..ae591b1b31d7 100644 --- a/components/sponsors/PlatinumSponsorsList.ts +++ b/components/sponsors/PlatinumSponsorsList.ts @@ -6,20 +6,20 @@ export const sponsors: SponsorType[] = [ website: 'https://www.solace.com', imageSrc: '/img/sponsors/solace.png', altText: 'Solace', - imageClass: 'inline-block px-4 sm:h-12' + imageClass: 'inline-block px-4 sm:h-12', }, { name: 'Gravitee.io', website: 'https://www.gravitee.io', imageSrc: '/img/sponsors/gravitee.io_logo.jpg', altText: 'Gravitee.io', - imageClass: 'inline-block px-4 sm:h-14' + imageClass: 'inline-block px-4 sm:h-14', }, { name: 'Postman', website: 'https://www.postman.com', imageSrc: '/img/sponsors/postman.png', altText: 'Postman', - imageClass: 'inline-block px-4 sm:h-18' - } + imageClass: 'inline-block px-4 sm:h-18', + }, ]; diff --git a/components/sponsors/SilverSponsors.tsx b/components/sponsors/SilverSponsors.tsx index f1276bed8b13..93d448ea7c47 100644 --- a/components/sponsors/SilverSponsors.tsx +++ b/components/sponsors/SilverSponsors.tsx @@ -14,24 +14,26 @@ interface SilverSponsorsProps { * @param {string} props.className - Additional CSS classes for styling. * @param {boolean} props.showSupportBanner - Indicates whether support banner should be displayed. */ -export default function SilverSponsors({ className = '' }: SilverSponsorsProps): React.ReactNode { +export default function SilverSponsors({ + className = '', +}: SilverSponsorsProps): React.ReactNode { return (
    -
    +
    {Silversponsors.map((sponsor, index) => ( ))} diff --git a/components/sponsors/SilverSponsorsList.ts b/components/sponsors/SilverSponsorsList.ts index e49c6667d886..b90076cba87f 100644 --- a/components/sponsors/SilverSponsorsList.ts +++ b/components/sponsors/SilverSponsorsList.ts @@ -3,51 +3,52 @@ import type { SponsorType } from '@/types/components/sponsors/SponsorType'; export const Silversponsors: SponsorType[] = [ { name: 'Bump.sh', - website: 'https://bump.sh/asyncapi?utm_source=asyncapi&utm_medium=referral&utm_campaign=sponsor', + website: + 'https://bump.sh/asyncapi?utm_source=asyncapi&utm_medium=referral&utm_campaign=sponsor', altText: 'OpenAPI & AsyncAPI API docs - Bump.sh', imageSrc: '/img/sponsors/bumpsh.svg', - imageClass: 'inline-block sm:h-9' + imageClass: 'inline-block sm:h-9', }, { name: 'Svix', website: 'https://www.svix.com/', altText: 'Svix', imageSrc: '/img/sponsors/svix_logo.svg', - imageClass: 'inline-block sm:h-9' + imageClass: 'inline-block sm:h-9', }, { name: 'HiveMQ', website: 'https://www.hivemq.com/', altText: 'HiveMQ', imageSrc: '/img/sponsors/hivemq_logo.png', - imageClass: 'inline-block sm:h-9' + imageClass: 'inline-block sm:h-9', }, { name: 'Aklivity', website: 'https://www.aklivity.io/', altText: 'Aklivity', imageSrc: '/img/sponsors/aklivity_logo.png', - imageClass: 'inline-block sm:h-9' + imageClass: 'inline-block sm:h-9', }, { name: 'SmartBear', website: 'https://smartbear.com', altText: 'SmartBear', imageSrc: '/img/sponsors/smartbear_logo.png', - imageClass: 'inline-block sm:h-9' + imageClass: 'inline-block sm:h-9', }, { name: 'HDI', website: 'https://www.hdi.global/', altText: 'HDI', imageSrc: '/img/sponsors/hdi_logo.png', - imageClass: 'inline-block sm:h-9' + imageClass: 'inline-block sm:h-9', }, { name: 'Route4Me', website: 'https://route4me.com', altText: 'Best Route Planning and Route Optimization Software', imageSrc: '/img/sponsors/route4me_logo.png', - imageClass: 'inline-block sm:h-9' - } + imageClass: 'inline-block sm:h-9', + }, ]; diff --git a/components/sponsors/SponsorImage.tsx b/components/sponsors/SponsorImage.tsx index e51e179e8330..243396385a7f 100644 --- a/components/sponsors/SponsorImage.tsx +++ b/components/sponsors/SponsorImage.tsx @@ -10,10 +10,21 @@ interface SponsorImageProps { /** * A component that displays sponsor logos with consistent dimensions */ -export default function SponsorImage({ src, alt = 'Sponsor logo', className }: SponsorImageProps) { +export default function SponsorImage({ + src, + alt = 'Sponsor logo', + className, +}: SponsorImageProps) { return ( -
    - {alt} +
    + {alt}
    ); } From 7e86760ffe49471f19da244f5afd1ef984b559fe Mon Sep 17 00:00:00 2001 From: 29deepanshutyagi <29deepanshutyagi@gmail.com> Date: Thu, 16 Jan 2025 14:56:09 +0530 Subject: [PATCH 8/9] Refactor CSS class order in CaseStudyCard component --- components/CaseStudyCard.tsx | 4 +-- components/sponsors/GoldSponsors.tsx | 16 +++++----- components/sponsors/GoldSponsorsList.ts | 4 +-- components/sponsors/PlatinumSponsors.tsx | 35 +++++++++------------ components/sponsors/PlatinumSponsorsList.ts | 8 ++--- components/sponsors/SilverSponsors.tsx | 16 +++++----- components/sponsors/SilverSponsorsList.ts | 19 ++++++----- components/sponsors/SponsorImage.tsx | 17 ++-------- pages/[lang]/index.tsx | 2 +- 9 files changed, 49 insertions(+), 72 deletions(-) diff --git a/components/CaseStudyCard.tsx b/components/CaseStudyCard.tsx index 26a2066b045c..f03cc6ab7029 100644 --- a/components/CaseStudyCard.tsx +++ b/components/CaseStudyCard.tsx @@ -19,11 +19,11 @@ export default function CaseStudyCard({ studies = [] }: ICaseStudyCardProps) { } return ( -
    +
    {studies.map((study, index) => (
    diff --git a/components/sponsors/GoldSponsors.tsx b/components/sponsors/GoldSponsors.tsx index 3e2a84179474..f7155ba4b4ec 100644 --- a/components/sponsors/GoldSponsors.tsx +++ b/components/sponsors/GoldSponsors.tsx @@ -14,26 +14,24 @@ interface GoldSponsorsProps { * @param {string} props.className - Additional CSS classes for styling. * @param {boolean} props.showSupportBanner - Indicates whether support banner should be displayed. */ -export default function GoldSponsors({ - className = '', -}: GoldSponsorsProps): React.ReactNode { +export default function GoldSponsors({ className = '' }: GoldSponsorsProps): React.ReactNode { return (
    -
    +
    {goldSponsors.map((sponsor, index) => ( ))} diff --git a/components/sponsors/GoldSponsorsList.ts b/components/sponsors/GoldSponsorsList.ts index aa8f3759a173..a46f464d7928 100644 --- a/components/sponsors/GoldSponsorsList.ts +++ b/components/sponsors/GoldSponsorsList.ts @@ -6,6 +6,6 @@ export const goldSponsors: SponsorType[] = [ website: 'https://www.ibm.com', imageSrc: '/img/sponsors/ibm.png', altText: 'IBM', - imageClass: 'inline-block px-4 sm:h-14', - }, + imageClass: 'inline-block px-4 sm:h-14' + } ]; diff --git a/components/sponsors/PlatinumSponsors.tsx b/components/sponsors/PlatinumSponsors.tsx index 659b42550704..cb83b776421c 100644 --- a/components/sponsors/PlatinumSponsors.tsx +++ b/components/sponsors/PlatinumSponsors.tsx @@ -14,44 +14,37 @@ interface SponsorsProps { * @param {string} props.className - Additional CSS classes for styling. * @param {boolean} props.showSupportBanner - Indicates whether support banner should be displayed. */ -export default function Sponsors({ - className = '', - showSupportBanner = true, -}: SponsorsProps): React.ReactNode { +export default function Sponsors({ className = '', showSupportBanner = true }: SponsorsProps): React.ReactNode { return (
    -
      +
        {sponsors.map((sponsor, index) => ( -
      • +
      • ))}
      {showSupportBanner && ( -
      - Want to become a sponsor?{' '} +
      + Want to become a sponsor?{' '} Support us! diff --git a/components/sponsors/PlatinumSponsorsList.ts b/components/sponsors/PlatinumSponsorsList.ts index ae591b1b31d7..bdc75f3a7141 100644 --- a/components/sponsors/PlatinumSponsorsList.ts +++ b/components/sponsors/PlatinumSponsorsList.ts @@ -6,20 +6,20 @@ export const sponsors: SponsorType[] = [ website: 'https://www.solace.com', imageSrc: '/img/sponsors/solace.png', altText: 'Solace', - imageClass: 'inline-block px-4 sm:h-12', + imageClass: 'inline-block px-4 sm:h-12' }, { name: 'Gravitee.io', website: 'https://www.gravitee.io', imageSrc: '/img/sponsors/gravitee.io_logo.jpg', altText: 'Gravitee.io', - imageClass: 'inline-block px-4 sm:h-14', + imageClass: 'inline-block px-4 sm:h-14' }, { name: 'Postman', website: 'https://www.postman.com', imageSrc: '/img/sponsors/postman.png', altText: 'Postman', - imageClass: 'inline-block px-4 sm:h-18', - }, + imageClass: 'inline-block px-4 sm:h-18' + } ]; diff --git a/components/sponsors/SilverSponsors.tsx b/components/sponsors/SilverSponsors.tsx index 93d448ea7c47..f1276bed8b13 100644 --- a/components/sponsors/SilverSponsors.tsx +++ b/components/sponsors/SilverSponsors.tsx @@ -14,26 +14,24 @@ interface SilverSponsorsProps { * @param {string} props.className - Additional CSS classes for styling. * @param {boolean} props.showSupportBanner - Indicates whether support banner should be displayed. */ -export default function SilverSponsors({ - className = '', -}: SilverSponsorsProps): React.ReactNode { +export default function SilverSponsors({ className = '' }: SilverSponsorsProps): React.ReactNode { return (
      -
      +
      {Silversponsors.map((sponsor, index) => ( ))} diff --git a/components/sponsors/SilverSponsorsList.ts b/components/sponsors/SilverSponsorsList.ts index b90076cba87f..e49c6667d886 100644 --- a/components/sponsors/SilverSponsorsList.ts +++ b/components/sponsors/SilverSponsorsList.ts @@ -3,52 +3,51 @@ import type { SponsorType } from '@/types/components/sponsors/SponsorType'; export const Silversponsors: SponsorType[] = [ { name: 'Bump.sh', - website: - 'https://bump.sh/asyncapi?utm_source=asyncapi&utm_medium=referral&utm_campaign=sponsor', + website: 'https://bump.sh/asyncapi?utm_source=asyncapi&utm_medium=referral&utm_campaign=sponsor', altText: 'OpenAPI & AsyncAPI API docs - Bump.sh', imageSrc: '/img/sponsors/bumpsh.svg', - imageClass: 'inline-block sm:h-9', + imageClass: 'inline-block sm:h-9' }, { name: 'Svix', website: 'https://www.svix.com/', altText: 'Svix', imageSrc: '/img/sponsors/svix_logo.svg', - imageClass: 'inline-block sm:h-9', + imageClass: 'inline-block sm:h-9' }, { name: 'HiveMQ', website: 'https://www.hivemq.com/', altText: 'HiveMQ', imageSrc: '/img/sponsors/hivemq_logo.png', - imageClass: 'inline-block sm:h-9', + imageClass: 'inline-block sm:h-9' }, { name: 'Aklivity', website: 'https://www.aklivity.io/', altText: 'Aklivity', imageSrc: '/img/sponsors/aklivity_logo.png', - imageClass: 'inline-block sm:h-9', + imageClass: 'inline-block sm:h-9' }, { name: 'SmartBear', website: 'https://smartbear.com', altText: 'SmartBear', imageSrc: '/img/sponsors/smartbear_logo.png', - imageClass: 'inline-block sm:h-9', + imageClass: 'inline-block sm:h-9' }, { name: 'HDI', website: 'https://www.hdi.global/', altText: 'HDI', imageSrc: '/img/sponsors/hdi_logo.png', - imageClass: 'inline-block sm:h-9', + imageClass: 'inline-block sm:h-9' }, { name: 'Route4Me', website: 'https://route4me.com', altText: 'Best Route Planning and Route Optimization Software', imageSrc: '/img/sponsors/route4me_logo.png', - imageClass: 'inline-block sm:h-9', - }, + imageClass: 'inline-block sm:h-9' + } ]; diff --git a/components/sponsors/SponsorImage.tsx b/components/sponsors/SponsorImage.tsx index 243396385a7f..e51e179e8330 100644 --- a/components/sponsors/SponsorImage.tsx +++ b/components/sponsors/SponsorImage.tsx @@ -10,21 +10,10 @@ interface SponsorImageProps { /** * A component that displays sponsor logos with consistent dimensions */ -export default function SponsorImage({ - src, - alt = 'Sponsor logo', - className, -}: SponsorImageProps) { +export default function SponsorImage({ src, alt = 'Sponsor logo', className }: SponsorImageProps) { return ( -
      - {alt} +
      + {alt}
      ); } diff --git a/pages/[lang]/index.tsx b/pages/[lang]/index.tsx index 5dbb64b86a82..705f34789b72 100644 --- a/pages/[lang]/index.tsx +++ b/pages/[lang]/index.tsx @@ -21,8 +21,8 @@ import NewsletterSubscribe from '../../components/NewsletterSubscribe'; import NewsroomSection from '../../components/newsroom/NewsroomSection'; import Slack from '../../components/slack'; import GoldSponsors from '../../components/sponsors/GoldSponsors'; -import SilverSponsors from '../../components/sponsors/SilverSponsors'; import Sponsors from '../../components/sponsors/PlatinumSponsors'; +import SilverSponsors from '../../components/sponsors/SilverSponsors'; import SupportUs from '../../components/SupportUs/SupportUs'; import Testimonial from '../../components/Testimonial'; import Heading from '../../components/typography/Heading'; From 68a02ba7a5b47b2f92732dbf7121eff72515942b Mon Sep 17 00:00:00 2001 From: Ansh Goyal Date: Mon, 27 Jan 2025 04:50:53 +0000 Subject: [PATCH 9/9] rename exports Signed-off-by: Ansh Goyal --- components/sponsors/PlatinumSponsors.tsx | 6 +++--- components/sponsors/PlatinumSponsorsList.ts | 2 +- pages/[lang]/index.tsx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/sponsors/PlatinumSponsors.tsx b/components/sponsors/PlatinumSponsors.tsx index cb83b776421c..824156759603 100644 --- a/components/sponsors/PlatinumSponsors.tsx +++ b/components/sponsors/PlatinumSponsors.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { sponsors } from './PlatinumSponsorsList'; +import { platinumSponsors } from './PlatinumSponsorsList'; import SponsorImage from './SponsorImage'; interface SponsorsProps { @@ -14,11 +14,11 @@ interface SponsorsProps { * @param {string} props.className - Additional CSS classes for styling. * @param {boolean} props.showSupportBanner - Indicates whether support banner should be displayed. */ -export default function Sponsors({ className = '', showSupportBanner = true }: SponsorsProps): React.ReactNode { +export default function PlatinumSponsors({ className = '', showSupportBanner = true }: SponsorsProps): React.ReactNode { return (