From edc6f7168e63c756322a4dda40db073c9d6a602a Mon Sep 17 00:00:00 2001 From: akshatnema Date: Wed, 24 Apr 2024 22:57:37 +0530 Subject: [PATCH 1/7] added index pages of website --- components/Hero.tsx | 5 +- pages/[lang]/index.tsx | 255 +++++++++++++++++++++++++++++++++++++++++ pages/index.tsx | 60 +++------- 3 files changed, 271 insertions(+), 49 deletions(-) create mode 100644 pages/[lang]/index.tsx diff --git a/components/Hero.tsx b/components/Hero.tsx index 6f9d717bf36..e670cfed116 100644 --- a/components/Hero.tsx +++ b/components/Hero.tsx @@ -4,7 +4,6 @@ import { ParagraphTypeStyle } from '@/types/typography/Paragraph'; import { useTranslation } from '../utils/i18n'; import AlgoliaSearch, { SearchButton } from './AlgoliaSearch'; // Import AlgoliaSearch component import Button from './buttons/Button'; -import DemoAnimation from './DemoAnimation'; import Features from './features'; import ArrowRight from './icons/ArrowRight'; import IconLoupe from './icons/Loupe'; @@ -77,9 +76,7 @@ export default function Hero({ className = '' }: HeroProps) { -
- -
+
{/* */}
diff --git a/pages/[lang]/index.tsx b/pages/[lang]/index.tsx new file mode 100644 index 00000000000..20e7e90db7e --- /dev/null +++ b/pages/[lang]/index.tsx @@ -0,0 +1,255 @@ +import React from 'react'; + +import { HeadingLevel, HeadingTypeStyle } from '@/types/typography/Heading'; + +import Button from '../../components/buttons/Button'; +import GoogleCalendarButton from '../../components/buttons/GoogleCalendarButton'; +import ICSFileButton from '../../components/buttons/ICSFileButton'; +import SubscribeButton from '../../components/buttons/SubscribeButton'; +import Calendar from '../../components/Calendar'; +import Head from '../../components/Head'; +import Hero from '../../components/Hero'; +import Container from '../../components/layout/Container'; +import AdidasLogo from '../../components/logos/Adidas'; +import AxwayLogo from '../../components/logos/Axway'; +import SalesforceLogo from '../../components/logos/Salesforce'; +import SapLogo from '../../components/logos/SAP'; +import SlackLogo from '../../components/logos/Slack'; +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/Sponsors'; +import SupportUs from '../../components/SupportUs/SupportUs'; +import Testimonial from '../../components/Testimonial'; +import Heading from '../../components/typography/Heading'; +import Paragraph from '../../components/typography/Paragraph'; +import TextLink from '../../components/typography/TextLink'; +import { getAllLanguageSlugs, getLanguage, useTranslation } from '../../utils/i18n'; + +/** + * @description The HomePage is the landing page of the website. + */ +export default function HomePage() { + const { t } = useTranslation('landing-page'); + + return ( + <> + +
+ + + + + + + {t('adopters.title')} + + + {t('adopters.description')} + + {t('adopters.linkText')} + + +
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+
+ +
+ + + +
+ + + + {t('community.title')} + + {t('community.subtitle')} +
+ +
+
+ +
+
+
+ + {t('community.slackCTATitle')} + + {t('community.slackCTADesc')} +
+
+
+
+
+ +
+
+ +
+
+
+ + {t('community.meetingTitle')} + + + {t('community.meetingDesc')} + + {t('community.meetingLink')} + +
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+
+
+
+
+ + + +
+
+ +
+ + + {t('sponsors.platinumTitle')} + + + + + + + {t('sponsors.goldTitle')} + + + + + + + {t('sponsors.silverTitle')} + + + + + + + {t('sponsors.sponsorCTATitle')} + + + {t('sponsors.sponsorCTADesc')} + + {t('sponsors.sponsorCTALink')} + + + +
+ + + {t('sponsors.supportedByTitle')} + + + {t('sponsors.supportedByPretext')} + + {t('sponsors.supportedByLink')} + {' '} + {t('sponsors.supportedByPosttext')} + + + + + + {t('testimonials.title')} + +
    + + + + +
+
+
+ + ); +} + +/** + * @description This function generates all language slugs for the landing page. + * @returns {object} The paths object containing all language slugs. + */ +export async function getStaticPaths() { + const paths = getAllLanguageSlugs(); + + return { + paths, + fallback: false + }; +} + +/** + * @description This function fetches the language content for the landing page. + * @param {object} params The language parameter. + * @returns {object} The language content for the landing page. + */ +export async function getStaticProps({ params }: any) { + const language = getLanguage(params.lang); + + return { + props: { + language + } + }; +} diff --git a/pages/index.tsx b/pages/index.tsx index deaaff2c28b..5bacdc950cf 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,54 +1,24 @@ -import { Inter } from 'next/font/google'; +import { languageDetection } from '@/utils/i18n'; -import AlgoliaSearch, { SearchButton } from '@/components/AlgoliaSearch'; -import Button from '@/components/buttons/Button'; -import IconArrowRight from '@/components/icons/ArrowRight'; -import IconLoupe from '@/components/icons/Loupe'; - -import { useTranslation } from '../utils/i18n'; - -const inter = Inter({ subsets: ['latin'] }); +import Head from '../components/Head'; /** - * @description The Home component is the main page of the application. + * @description This is the home page which is the first page that loads when the user visits the website. */ -export default function Home() { - const { t } = useTranslation('landing-page'); +export default function HomePage() { + const loader: string = 'img/loaders/loader.png'; // preloader image for the tools + + languageDetection(); return ( -
-
-
+ ); } From 0b4e4c88ca934a6add7edbb79bab1873eb01c472 Mon Sep 17 00:00:00 2001 From: akshatnema Date: Thu, 25 Apr 2024 19:13:15 +0530 Subject: [PATCH 2/7] fixed DemoAnimation --- components/DemoAnimation.tsx | 12 ++++++------ components/Hero.tsx | 5 ++++- package-lock.json | 9 +++++++++ package.json | 1 + 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/components/DemoAnimation.tsx b/components/DemoAnimation.tsx index 681680b34e5..7e4f9eb0069 100644 --- a/components/DemoAnimation.tsx +++ b/components/DemoAnimation.tsx @@ -1,5 +1,5 @@ import { useEffect, useState } from 'react'; -import Typing from 'react-typing-animation'; +import Typing from 'react-typist-component'; import { HeadingLevel, HeadingTypeStyle } from '@/types/typography/Heading'; @@ -43,7 +43,7 @@ export default function DemoAnimation({ className = '' }: IDemoAnimationProps) { const [showEmailDescription, setShowEmailDescription] = useState(false); const [finished, setFinished] = useState(false); const [showControls, setShowControls] = useState(false); - const typingSpeed = 60; + const typingDelay = 60; useEffect(() => { if (finished) { @@ -66,7 +66,7 @@ export default function DemoAnimation({ className = '' }: IDemoAnimationProps) { */ function renderTyping(children: React.ReactNode, callback: () => void) { return ( - } onFinishedTyping={callback}> + } onTypingDone={callback}> {children} ); @@ -100,7 +100,7 @@ export default function DemoAnimation({ className = '' }: IDemoAnimationProps) { return ( <> {common} - } onFinishedTyping={descriptionCallback}> + } onTypingDone={descriptionCallback}>
  description: This service is in charge of processing user signups :rocket: @@ -218,7 +218,7 @@ export default function DemoAnimation({ className = '' }: IDemoAnimationProps) { return ( <> {common} - } onFinishedTyping={descriptionCallback}> + } onTypingDone={descriptionCallback}>
            description: @@ -263,7 +263,7 @@ export default function DemoAnimation({ className = '' }: IDemoAnimationProps) { return ( <> {common} - } onFinishedTyping={descriptionCallback}> + } onTypingDone={descriptionCallback}>
            description: diff --git a/components/Hero.tsx b/components/Hero.tsx index e670cfed116..6f9d717bf36 100644 --- a/components/Hero.tsx +++ b/components/Hero.tsx @@ -4,6 +4,7 @@ import { ParagraphTypeStyle } from '@/types/typography/Paragraph'; import { useTranslation } from '../utils/i18n'; import AlgoliaSearch, { SearchButton } from './AlgoliaSearch'; // Import AlgoliaSearch component import Button from './buttons/Button'; +import DemoAnimation from './DemoAnimation'; import Features from './features'; import ArrowRight from './icons/ArrowRight'; import IconLoupe from './icons/Loupe'; @@ -76,7 +77,9 @@ export default function Hero({ className = '' }: HeroProps) {
-
{/* */}
+
+ +
diff --git a/package-lock.json b/package-lock.json index 439e915ae59..43a161d0924 100644 --- a/package-lock.json +++ b/package-lock.json @@ -58,6 +58,7 @@ "react-syntax-highlighter": "^15.5.0", "react-text-truncate": "^0.19.0", "react-twitter-embed": "^4.0.4", + "react-typist-component": "^1.0.6", "react-youtube-embed": "^1.0.3", "reading-time": "^1.5.0", "recharts": "^2.12.2", @@ -13242,6 +13243,14 @@ "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0" } }, + "node_modules/react-typist-component": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/react-typist-component/-/react-typist-component-1.0.6.tgz", + "integrity": "sha512-DOcMvPyqsB2dgh/DtfaDrrNSoZAFarToPXn82WN56vF9DJBeS5ss5voLI1x+nntXiWpWCUJkLL/rDS4/W0YTSQ==", + "peerDependencies": { + "react": ">=18.0.0" + } + }, "node_modules/react-youtube-embed": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/react-youtube-embed/-/react-youtube-embed-1.0.3.tgz", diff --git a/package.json b/package.json index a583ec70a87..0677f079e74 100644 --- a/package.json +++ b/package.json @@ -84,6 +84,7 @@ "react-syntax-highlighter": "^15.5.0", "react-text-truncate": "^0.19.0", "react-twitter-embed": "^4.0.4", + "react-typist-component": "^1.0.6", "react-youtube-embed": "^1.0.3", "reading-time": "^1.5.0", "recharts": "^2.12.2", From 8539ac55c5004a42ffe78c4f66356e6fcf192c46 Mon Sep 17 00:00:00 2001 From: Ansh Goyal Date: Thu, 25 Apr 2024 15:13:38 +0000 Subject: [PATCH 3/7] add minor fixes --- components/DemoAnimation.tsx | 2 +- pages/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/DemoAnimation.tsx b/components/DemoAnimation.tsx index 7e4f9eb0069..5b888a6d8aa 100644 --- a/components/DemoAnimation.tsx +++ b/components/DemoAnimation.tsx @@ -358,7 +358,7 @@ export default function DemoAnimation({ className = '' }: IDemoAnimationProps) {
-
&slash;&slash; Example
+
// Example
 
{'{'}
diff --git a/pages/index.tsx b/pages/index.tsx index 5bacdc950cf..348311a7aa2 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -15,7 +15,7 @@ export default function HomePage() {
- + Loading...
Loading...
From 002d0cd708b9b32abd8c16d5bc7fe9d8a3e966b0 Mon Sep 17 00:00:00 2001 From: akshatnema Date: Thu, 25 Apr 2024 21:45:43 +0530 Subject: [PATCH 4/7] included json in tsconfig --- tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index 57d570ff80d..d7c7683d940 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,6 +16,6 @@ "@/*": ["./*"] } }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "types/**/*.d.ts"], + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "types/**/*.d.ts", "**/*.json"], "exclude": ["node_modules", "netlify"] } From 37da86a8b8b218f7aac897fda892b7de434827f9 Mon Sep 17 00:00:00 2001 From: akshatnema Date: Thu, 25 Apr 2024 22:57:34 +0530 Subject: [PATCH 5/7] fixed meeting event issue --- components/Calendar.tsx | 2 + utils/api.ts | 38 +++----- utils/staticHelpers.js | 204 ---------------------------------------- utils/staticHelpers.ts | 171 +++++++++++++++++++++++++++++++++ 4 files changed, 188 insertions(+), 227 deletions(-) delete mode 100644 utils/staticHelpers.js create mode 100644 utils/staticHelpers.ts diff --git a/components/Calendar.tsx b/components/Calendar.tsx index 2805abf2f7c..3b5c176dd8b 100644 --- a/components/Calendar.tsx +++ b/components/Calendar.tsx @@ -29,6 +29,8 @@ export default function Calendar({ className = '', size }: ICalendarProps) { 'https://calendar.google.com/calendar/embed?src=c_q9tseiglomdsj6njuhvbpts11c%40group.calendar.google.com&ctz=UTC'; const eventsExist = eventsData.length > 0; + console.log(getEvents(eventsData, size)); + return (
diff --git a/utils/api.ts b/utils/api.ts index d7a35af5073..bbeef4bcf1b 100644 --- a/utils/api.ts +++ b/utils/api.ts @@ -15,22 +15,19 @@ export function getAllPosts(): IPosts { * @param {string} [type=''] - The type of the post. * @returns {Object | undefined} The post if found, undefined otherwise. */ -export function getPostBySlug( - slug: string, - type: string = '' -) { - if(type) - return (posts as any)[type].find((post: IPost) => post.slug === slug && !post.isSection ) - else { - let item; - Object.entries(posts).forEach(([key, value]) => { - let content - if(key!== 'docsTree') - content = (posts as any)[key].find((post: IPost) => post.slug === slug && !post.isSection) - if(content) item = content - }) - return item - } +export function getPostBySlug(slug: string, type: string = '') { + if (type) return (posts as any)[type].find((post: IPost) => post.slug === slug && !post.isSection); + + let item; + + Object.entries(posts).forEach(([key]) => { + let content; + + if (key !== 'docsTree') content = (posts as any)[key].find((post: IPost) => post.slug === slug && !post.isSection); + if (content) item = content; + }); + + return item; } /** @@ -39,11 +36,6 @@ export function getPostBySlug( * @param {string} slug - The slug of the document. * @returns {Object | undefined} The document if found, undefined otherwise. */ -export function getDocBySlug( - structuredPosts: IPost[], - slug: string -): object | undefined { - return structuredPosts.find( - (post) => post.slug === slug && !post.isSection - ); +export function getDocBySlug(structuredPosts: IPost[], slug: string): object | undefined { + return structuredPosts.find((post) => post.slug === slug && !post.isSection); } diff --git a/utils/staticHelpers.js b/utils/staticHelpers.js deleted file mode 100644 index 3dab218265b..00000000000 --- a/utils/staticHelpers.js +++ /dev/null @@ -1,204 +0,0 @@ -import { getPostBySlug, getAllPosts } from './api'; -import moment from 'moment'; - -export function getStaticPropsHelper(path) { - return async function getStaticProps({ params }) { - const navItems = [ - { - title: 'Getting started', - slug: 'docs/getting-started', - items: getSectionItems('docs/getting-started'), - }, - { - title: 'Tutorials', - slug: 'docs/tutorials', - items: getSectionItems('docs/tutorials'), - }, - ]; - const post = getPostBySlug( - path, - params && params.slug ? params.slug : 'index', - [ - 'title', - 'date', - 'slug', - 'fullSlug', - 'author', - 'content', - 'ogImage', - 'coverImage', - ] - ); - const content = post.content || ''; - - return { - props: { - post: { - ...post, - content, - }, - navItems, - }, - }; - }; -} - -function getSectionItems(path) { - return getAllPosts(path, ['slug', 'fullSlug', 'title', 'weight']).sort( - (p1, p2) => (p1.weight || 0) - (p2.weight || 0) - ); -} - -export function getStaticPathsHelper(path) { - return async function getStaticPaths() { - const posts = getAllPosts(path, ['slug']); - - return { - paths: posts.map((post) => { - return { - params: { - slug: post.slug, - }, - }; - }), - fallback: false, - }; - }; -} - -export function getEvents(events, size) { - let meetingsWithDates = events.map((event) => ({ - ...event, - date: moment(event.date), - })); - meetingsWithDates.sort((a, b) => a.date - b.date); - if (size) { - return meetingsWithDates - .filter((meeting) => meeting.date > new Date()) - .slice(0, size || meetingsWithDates.length); - } - const sortedMeetings = []; - meetingsWithDates.filter((a) => { - if (a.date > new Date()) { - sortedMeetings.push(a); - } - }); - meetingsWithDates.sort((a, b) => { - return b.date - a.date - }) - meetingsWithDates.filter((a) => { - if (a.date < new Date()) { - sortedMeetings.push(a); - } - }); - - meetingsWithDates = sortedMeetings - - return meetingsWithDates; -} - -export const generateCaseStudyContent = (data) => { - const { challenges, solution, usecase, architecture, testing, codegen, schemaStorage, registry, versioning, validation, asyncapiStorage, asyncapiEditing, asyncapiExtensions, asyncapiDocumentation, asyncapiBindings, asyncapiTools, additionalResources, casestudy } = data; - const languages= casestudy.technical.languages - const frameworks=casestudy.technical.frameworks - const protocols=casestudy.technical.protocols - const versions=casestudy.asyncapi.versions - - return [ - { - title: "Challenges", - content: challenges, - }, - { - title: "Solution", - content: solution, - }, - { - title: "Use Case", - content: usecase, - }, - { - title: "More Details", - items: [ - `Languages: ${languages.join(", ")}`, - `Frameworks: ${frameworks.join(", ")}`, - `Protocols: ${protocols.join(", ")}`, - ], - children: [ - { - title: "Testing strategy", - content: testing, - }, - { - title: "Approach to code generation", - content: codegen, - }, - { - title: "Architecture", - content: architecture, - }, - { - title: "More Details about AsyncAPI", - items: [ - `Version: ${versions.join(", ")}`, - `Who maintains documents: ${casestudy.asyncapi.maintainers}}`, - `Internal users: ${casestudy.asyncapi.audience.internal.toString()}`, - `External users: ${casestudy.asyncapi.audience.external.toString()}`, - ], - children: [ - { - title: "How AsyncAPI documents are stored", - content: asyncapiStorage, - }, - { - title: "Where maintainers edit AsyncAPI documents", - content: asyncapiEditing, - }, - { - title: "What extensions are used", - content: asyncapiExtensions, - }, - { - title: "How documentation is generated", - content: asyncapiDocumentation, - }, - { - title: "What bindings are used", - content: asyncapiBindings, - }, - { - title: "What tools are used", - content: asyncapiTools, - }, - ], - }, - { - title: "Schemas", - items: [`Spec: ${casestudy.schemas.description}`], - children: [ - { - title: "Storage strategy", - content: schemaStorage, - }, - { - title: "Schema Registry", - content: registry, - }, - { - title: "Versioning of schemas", - content: versioning, - }, - { - title: "Validation of message schemas", - content: validation, - }, - { - title: "Additional Resources", - content: additionalResources, - }, - ], - }, - ], - }, - ]; -} \ No newline at end of file diff --git a/utils/staticHelpers.ts b/utils/staticHelpers.ts new file mode 100644 index 00000000000..b1175af762e --- /dev/null +++ b/utils/staticHelpers.ts @@ -0,0 +1,171 @@ +import moment from 'moment'; + +import type { IEvent } from '@/types/event'; + +/** + * + * @param events + * @param size + * @returns + */ +export function getEvents(events: IEvent[], size?: number) { + let meetingsWithDates: any = events.map((event) => ({ + ...event, + date: moment(event.date) + })); + + meetingsWithDates.sort((a: any, b: any) => a.date - b.date); + + if (size) { + return meetingsWithDates + .filter((meeting: any) => meeting.date > moment(new Date().toDateString())) + .slice(0, size || meetingsWithDates.length); + } + + const sortedMeetings: any = []; + + for (const meeting of meetingsWithDates) { + if (meeting.date > moment(new Date().toDateString())) { + sortedMeetings.push(meeting); + } + } + + meetingsWithDates.sort((a: any, b: any) => { + return b.date - a.date; + }); + + for (const meeting of meetingsWithDates) { + if (meeting.date < moment(new Date().toDateString())) { + sortedMeetings.push(meeting); + } + } + + meetingsWithDates = sortedMeetings; + + return meetingsWithDates; +} + +export const generateCaseStudyContent = (data: any) => { + const { + challenges, + solution, + usecase, + architecture, + testing, + codegen, + schemaStorage, + registry, + versioning, + validation, + asyncapiStorage, + asyncapiEditing, + asyncapiExtensions, + asyncapiDocumentation, + asyncapiBindings, + asyncapiTools, + additionalResources, + casestudy + } = data; + const { languages } = casestudy.technical; + const { frameworks } = casestudy.technical; + const { protocols } = casestudy.technical; + const { versions } = casestudy.asyncapi; + + return [ + { + title: 'Challenges', + content: challenges + }, + { + title: 'Solution', + content: solution + }, + { + title: 'Use Case', + content: usecase + }, + { + title: 'More Details', + items: [ + `Languages: ${languages.join(', ')}`, + `Frameworks: ${frameworks.join(', ')}`, + `Protocols: ${protocols.join(', ')}` + ], + children: [ + { + title: 'Testing strategy', + content: testing + }, + { + title: 'Approach to code generation', + content: codegen + }, + { + title: 'Architecture', + content: architecture + }, + { + title: 'More Details about AsyncAPI', + items: [ + `Version: ${versions.join(', ')}`, + `Who maintains documents: ${casestudy.asyncapi.maintainers}`, + `Internal users: ${casestudy.asyncapi.audience.internal.toString()}`, + `External users: ${casestudy.asyncapi.audience.external.toString()}` + ], + children: [ + { + title: 'How AsyncAPI documents are stored', + content: asyncapiStorage + }, + { + title: 'Where maintainers edit AsyncAPI documents', + content: asyncapiEditing + }, + { + title: 'What extensions are used', + content: asyncapiExtensions + }, + { + title: 'How documentation is generated', + content: asyncapiDocumentation + }, + { + title: 'What bindings are used', + content: asyncapiBindings + }, + { + title: 'What tools are used', + content: asyncapiTools + } + ] + }, + { + title: 'Schemas', + items: [`Spec: ${casestudy.schemas.description}`], + children: [ + { + title: 'Storage strategy', + content: schemaStorage + }, + { + title: 'Schema Registry', + content: registry + }, + { + title: 'Versioning of schemas', + content: versioning + }, + { + title: 'Validation of message schemas', + content: validation + }, + { + title: 'Additional Resources', + content: additionalResources + } + ] + } + ] + } + ]; +}; From 2aca532fe070b83c610b5ee675b4d7b3164e6e5e Mon Sep 17 00:00:00 2001 From: Ansh Goyal Date: Fri, 26 Apr 2024 09:17:47 +0530 Subject: [PATCH 6/7] Apply suggestions from code review --- components/Calendar.tsx | 2 -- utils/staticHelpers.ts | 8 ++++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/components/Calendar.tsx b/components/Calendar.tsx index 3b5c176dd8b..2805abf2f7c 100644 --- a/components/Calendar.tsx +++ b/components/Calendar.tsx @@ -29,8 +29,6 @@ export default function Calendar({ className = '', size }: ICalendarProps) { 'https://calendar.google.com/calendar/embed?src=c_q9tseiglomdsj6njuhvbpts11c%40group.calendar.google.com&ctz=UTC'; const eventsExist = eventsData.length > 0; - console.log(getEvents(eventsData, size)); - return (
diff --git a/utils/staticHelpers.ts b/utils/staticHelpers.ts index b1175af762e..230f26da6ee 100644 --- a/utils/staticHelpers.ts +++ b/utils/staticHelpers.ts @@ -3,10 +3,10 @@ import moment from 'moment'; import type { IEvent } from '@/types/event'; /** - * - * @param events - * @param size - * @returns + * Retrieves events sorted by date. + * @param {IEvent[]} events - The list of events to retrieve. + * @param {number} [size] - The optional maximum number of events to return. + * @returns {any[]} The sorted list of events. */ export function getEvents(events: IEvent[], size?: number) { let meetingsWithDates: any = events.map((event) => ({ From b7e5b9cd36cd107f9a19db43c147e36b33142cbc Mon Sep 17 00:00:00 2001 From: akshatnema Date: Fri, 26 Apr 2024 14:52:47 +0530 Subject: [PATCH 7/7] resolved DemoAnimation and TextLink space --- components/DemoAnimation.tsx | 3 ++- components/typography/TextLink.tsx | 23 +++++++++++++---------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/components/DemoAnimation.tsx b/components/DemoAnimation.tsx index 5b888a6d8aa..0e8affd7628 100644 --- a/components/DemoAnimation.tsx +++ b/components/DemoAnimation.tsx @@ -358,7 +358,8 @@ export default function DemoAnimation({ className = '' }: IDemoAnimationProps) {
-
// Example
+ {/* eslint-disable-next-line react/jsx-no-comment-textnodes */} +
// Example
 
{'{'}
diff --git a/components/typography/TextLink.tsx b/components/typography/TextLink.tsx index d8d5d82c5cd..985604c3a35 100644 --- a/components/typography/TextLink.tsx +++ b/components/typography/TextLink.tsx @@ -24,15 +24,18 @@ export default function TextLink({ href, className = '', target = '_blank', chil ); return ( - - {children} - + <> + {' '} + + {children} + + ); }