Skip to content

Commit

Permalink
Merge branch 'buildPostTest' of https://github.com/vishvamsinh28/website
Browse files Browse the repository at this point in the history
 into buildPostTest
  • Loading branch information
vishvamsinh28 committed Oct 17, 2024
2 parents 2182feb + 8290dc3 commit 00d2ca9
Show file tree
Hide file tree
Showing 210 changed files with 600 additions and 272 deletions.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,15 @@
"contributions": [
"doc"
]
},
{
"login": "raj17ce",
"name": "Raj Patel",
"avatar_url": "https://avatars.githubusercontent.com/u/116947399?v=4",
"profile": "https://github.com/raj17ce",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Shiva953"><img src="https://avatars.githubusercontent.com/u/120790871?v=4?s=100" width="100px;" alt="Neutron"/><br /><sub><b>Neutron</b></sub></a><br /><a href="https://github.com/asyncapi/website/commits?author=Shiva953" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/sagarkori143"><img src="https://avatars.githubusercontent.com/u/129517558?v=4?s=100" width="100px;" alt="Sagar Kori"/><br /><sub><b>Sagar Kori</b></sub></a><br /><a href="https://github.com/asyncapi/website/commits?author=sagarkori143" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/raj17ce"><img src="https://avatars.githubusercontent.com/u/116947399?v=4?s=100" width="100px;" alt="Raj Patel"/><br /><sub><b>Raj Patel</b></sub></a><br /><a href="https://github.com/asyncapi/website/commits?author=raj17ce" title="Code">💻</a></td>
</tr>
</tbody>
</table>

Expand Down
11 changes: 9 additions & 2 deletions components/AlgoliaSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import clsx from 'clsx';
import Head from 'next/head';
import Link from 'next/link';
import { useRouter } from 'next/router';
import { createContext, useCallback, useContext, useEffect, useRef, useState } from 'react';
import React, { createContext, useCallback, useContext, useEffect, useRef, useState } from 'react';
import { createPortal } from 'react-dom';

export const INDEX_NAME = 'asyncapi';
Expand Down Expand Up @@ -283,6 +283,7 @@ export default function AlgoliaSearch({ children }: { children: React.ReactNode
*/
export function SearchButton({ children, indexName = INDEX_NAME, ...props }: ISearchButtonProps) {
const { onOpen, onInput } = useContext(SearchContext);
const [Children, setChildren] = useState<string | React.ReactNode>('');
const searchButtonRef = useRef<HTMLButtonElement>(null);
const actionKey = getActionKey();

Expand All @@ -308,6 +309,12 @@ export function SearchButton({ children, indexName = INDEX_NAME, ...props }: ISe
};
}, [onInput, searchButtonRef]);

useEffect(() => {
if (typeof children === 'function') {
setChildren(children({ actionKey }));
}
}, []);

return (
<button
type='button'
Expand All @@ -318,7 +325,7 @@ export function SearchButton({ children, indexName = INDEX_NAME, ...props }: ISe
{...props}
data-testid='Search-Button'
>
{typeof children === 'function' ? children({ actionKey }) : children}
{Children}
</button>
);
}
12 changes: 10 additions & 2 deletions components/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,17 @@ export default function Avatar({ name, photo, link, className }: AvatarProps) {
);

return link ? (
<a href={link} data-testid='Avatars-link'>
<button
onClick={(e) => {
e.preventDefault();

window.open(link, '_blank');
}}
data-testid='Avatars-link'
className='cursor-pointer border-none bg-inherit p-0'
>
{avatar}
</a>
</button>
) : (
<React.Fragment>{avatar}</React.Fragment>
);
Expand Down
1 change: 1 addition & 0 deletions components/Calendar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import moment from 'moment';
import React from 'react';
import { twMerge } from 'tailwind-merge';

import type { IEvent } from '@/types/event';
Expand Down
2 changes: 2 additions & 0 deletions components/CaseStudyCard.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import type { ICaseStudies } from '@/types/post';
import { ParagraphTypeStyle } from '@/types/typography/Paragraph';

Expand Down
2 changes: 1 addition & 1 deletion components/CaseTOC.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useMemo, useState } from 'react';
import React, { useMemo, useState } from 'react';
import { twMerge } from 'tailwind-merge';

import { useHeadingsObserver } from './helpers/useHeadingsObserver';
Expand Down
1 change: 1 addition & 0 deletions components/ClickableLogo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Link from 'next/link';
import React from 'react';

import AsyncAPILogo from './logos/AsyncAPILogo';

Expand Down
2 changes: 1 addition & 1 deletion components/DemoAnimation.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useEffect, useState } from 'react';
import React, { useEffect, useState } from 'react';
import Typing from 'react-typist-component';

import { HeadingLevel, HeadingTypeStyle } from '@/types/typography/Heading';
Expand Down
2 changes: 1 addition & 1 deletion components/Feedback.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useRouter } from 'next/router';
import { useEffect, useState } from 'react';
import React, { useEffect, useState } from 'react';

import GitHubIssue from './buttons/GitHubIssue';

Expand Down
2 changes: 2 additions & 0 deletions components/Figure.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { Float } from '@/types/components/FigurePropsType';

import Caption from './Caption';
Expand Down
2 changes: 2 additions & 0 deletions components/FinancialSummary/AsyncAPISummary.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { HeadingLevel, HeadingTypeStyle } from '@/types/typography/Heading';
import { ParagraphTypeStyle } from '@/types/typography/Paragraph';

Expand Down
2 changes: 2 additions & 0 deletions components/FinancialSummary/Card.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import type { ExpenseItem, Expenses } from '@/types/FinancialSummary/BarChartComponent';

import ExpensesLinkData from '../../config/finance/json-data/ExpensesLink.json';
Expand Down
2 changes: 2 additions & 0 deletions components/FinancialSummary/ContactUs.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { HeadingLevel, HeadingTypeStyle } from '@/types/typography/Heading';
import { ParagraphTypeStyle } from '@/types/typography/Paragraph';

Expand Down
2 changes: 2 additions & 0 deletions components/FinancialSummary/CustomTooltip.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import type { CustomTooltipProps } from '@/types/FinancialSummary/BarChartComponent';

/**
Expand Down
2 changes: 2 additions & 0 deletions components/FinancialSummary/ExpenseBreakdown.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { ParagraphTypeStyle } from '@/types/typography/Paragraph';

import { expenseData } from '../data/ExpenseBreakdownData';
Expand Down
2 changes: 2 additions & 0 deletions components/FinancialSummary/ExpensesCard.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import type { Expenses } from '@/types/FinancialSummary/BarChartComponent';

import ExpensesData from '../../config/finance/json-data/Expenses.json';
Expand Down
2 changes: 2 additions & 0 deletions components/FinancialSummary/OtherFormsComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { ParagraphTypeStyle } from '@/types/typography/Paragraph';

import { otherFormsData } from '../data/otherFormsData';
Expand Down
2 changes: 2 additions & 0 deletions components/FinancialSummary/SponsorshipTiers.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { HeadingLevel, HeadingTypeStyle } from '@/types/typography/Heading';
import { ParagraphTypeStyle } from '@/types/typography/Paragraph';

Expand Down
2 changes: 2 additions & 0 deletions components/FinancialSummary/SuccessStories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { successStories } from '../data/successStoriesData';

/**
Expand Down
2 changes: 1 addition & 1 deletion components/GeneratorInstallation.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useState } from 'react';
import React, { useState } from 'react';

import { ParagraphTypeStyle } from '@/types/typography/Paragraph';

Expand Down
2 changes: 2 additions & 0 deletions components/Hero.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { HeadingLevel, HeadingTypeStyle } from '@/types/typography/Heading';
import { ParagraphTypeStyle } from '@/types/typography/Paragraph';

Expand Down
2 changes: 1 addition & 1 deletion components/InlineHelp.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useEffect, useState } from 'react';
import React, { useEffect, useState } from 'react';

import { registerClickAway } from './helpers/click-away';
import QuestionMark from './icons/QuestionMark';
Expand Down
1 change: 1 addition & 0 deletions components/InputBox.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useArgs } from '@storybook/preview-api';
import type { Meta, StoryObj } from '@storybook/react';
import React from 'react';

import type { InputBoxProps } from '@/types/components/InputBoxPropsType';
import { InputTypes } from '@/types/components/InputBoxPropsType';
Expand Down
1 change: 1 addition & 0 deletions components/Loader.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';
import React from 'react';

import AsyncAPIColorIcon from '@/components/icons/AsyncAPIColorIcon';
import IconCircularLoader from '@/components/icons/CircularLoader';
Expand Down
4 changes: 3 additions & 1 deletion components/Loader.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React from 'react';
import { twMerge } from 'tailwind-merge';

import AsyncAPIColorIcon from './icons/AsyncAPIColorIcon';

interface LoaderProps {
// eslint-disable-next-line prettier/prettier

Expand All @@ -25,7 +27,7 @@ interface LoaderProps {
*/
export default function Loader({
loaderText = '',
loaderIcon = null,
loaderIcon = <AsyncAPIColorIcon alt='Loading...' />,
className = '',
dark = false,
pulsating = false
Expand Down
2 changes: 1 addition & 1 deletion components/MDX/MDX.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { MDXProvider as CoreMDXProvider } from '@mdx-js/react';
import mermaid from 'mermaid';
import Link from 'next/link';
import { useLayoutEffect, useState } from 'react';
import React, { useLayoutEffect, useState } from 'react';
import {
TwitterDMButton,
TwitterFollowButton,
Expand Down
2 changes: 2 additions & 0 deletions components/MacWindow.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

interface IMacWindowProps {
className?: string;
contentClassName?: string;
Expand Down
1 change: 1 addition & 0 deletions components/Meeting.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ArrowRightIcon } from '@heroicons/react/outline';
import React from 'react';

import { ParagraphTypeStyle } from '@/types/typography/Paragraph';

Expand Down
2 changes: 1 addition & 1 deletion components/Modal.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useEffect, useRef } from 'react';
import React, { useEffect, useRef } from 'react';

interface IModalProps {
title: string;
Expand Down
2 changes: 1 addition & 1 deletion components/NewsletterSubscribe.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useTranslation } from 'next-i18next';
import { useState } from 'react';
import React, { useState } from 'react';

import IconCircularLoader from '@/components/icons/CircularLoader';
import { ButtonType } from '@/types/components/buttons/ButtonPropsType';
Expand Down
2 changes: 2 additions & 0 deletions components/Profiles.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

type Profile = {
name: string;
link: string;
Expand Down
2 changes: 2 additions & 0 deletions components/Remember.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import LightBulb from './icons/LightBulb';

interface RememberProps {
Expand Down
2 changes: 2 additions & 0 deletions components/SupportUs/SupportUs.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { items } from './SupportItemsList';

interface SupportUsProps {
Expand Down
2 changes: 1 addition & 1 deletion components/TOC.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useState } from 'react';
import React, { useState } from 'react';
import Scrollspy from 'react-scrollspy';
import { twMerge } from 'tailwind-merge';

Expand Down
2 changes: 2 additions & 0 deletions components/Testimonial.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import IconQuote from './icons/Quote';
import Paragraph from './typography/Paragraph';

Expand Down
2 changes: 2 additions & 0 deletions components/Warning.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import IconExclamation from './icons/Exclamation';

interface WarningProps {
Expand Down
1 change: 1 addition & 0 deletions components/buttons/Button.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';
import React from 'react';

import { ButtonIconPosition, ButtonSize, ButtonType } from '@/types/components/buttons/ButtonPropsType';

Expand Down
1 change: 1 addition & 0 deletions components/buttons/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Link from 'next/link';
import React from 'react';
import { twMerge } from 'tailwind-merge';

import { ButtonIconPosition, ButtonSize, ButtonType } from '@/types/components/buttons/ButtonPropsType';
Expand Down
1 change: 1 addition & 0 deletions components/buttons/ChapterSuggestion.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Link from 'next/link';
import type { HTMLAttributeAnchorTarget } from 'react';
import React from 'react';
import type { Url } from 'url';

import IconArrowRight from '../icons/ArrowRight';
Expand Down
2 changes: 2 additions & 0 deletions components/buttons/ChapterSuggestions.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import type { IChapterSuggestionProps } from './ChapterSuggestion';
import ChapterSuggestion from './ChapterSuggestion';

Expand Down
1 change: 1 addition & 0 deletions components/buttons/DocsButton.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Link from 'next/link';
import React from 'react';

import type { IDocs } from '@/types/post';

Expand Down
2 changes: 2 additions & 0 deletions components/buttons/GithubButton.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { ButtonIconPosition, ButtonSize } from '@/types/components/buttons/ButtonPropsType';

import type { IButtonDefaultProps } from '../../types/components/buttons/types';
Expand Down
2 changes: 2 additions & 0 deletions components/buttons/GoogleCalendarButton.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { ButtonIconPosition } from '@/types/components/buttons/ButtonPropsType';

import type { IButtonDefaultProps } from '../../types/components/buttons/types';
Expand Down
2 changes: 2 additions & 0 deletions components/buttons/ICSFileButton.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { ButtonIconPosition } from '@/types/components/buttons/ButtonPropsType';

import type { IButtonDefaultProps } from '../../types/components/buttons/types';
Expand Down
2 changes: 2 additions & 0 deletions components/buttons/OpenInStudioButton.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import IconRocket from '../icons/Rocket';
import Button from './Button';

Expand Down
2 changes: 2 additions & 0 deletions components/buttons/SlackButton.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { ButtonIconPosition } from '@/types/components/buttons/ButtonPropsType';

import type { IButtonDefaultProps } from '../../types/components/buttons/types';
Expand Down
2 changes: 2 additions & 0 deletions components/buttons/SubscribeButton.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { ButtonIconPosition } from '@/types/components/buttons/ButtonPropsType';

import type { IButtonDefaultProps } from '../../types/components/buttons/types';
Expand Down
2 changes: 2 additions & 0 deletions components/buttons/YoutubeButton.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { ButtonIconPosition } from '@/types/components/buttons/ButtonPropsType';

import type { IButtonDefaultProps } from '../../types/components/buttons/types';
Expand Down
2 changes: 1 addition & 1 deletion components/campaigns/AnnouncementHero.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useEffect, useState } from 'react';
import React, { useEffect, useState } from 'react';

import ArrowLeft from '../icons/ArrowLeft';
import ArrowRight from '../icons/ArrowRight';
Expand Down
2 changes: 2 additions & 0 deletions components/community/Hero.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import orbitData from '../../config/orbitData.json';
import Header from './Header';

Expand Down
2 changes: 2 additions & 0 deletions components/dashboard/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

interface ButtonProps {
text: string;
onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
Expand Down
2 changes: 1 addition & 1 deletion components/dashboard/GoodFirstIssues.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useState } from 'react';
import React, { useState } from 'react';

import type { Issue } from '@/types/components/dashboard/TableTypes';

Expand Down
Loading

0 comments on commit 00d2ca9

Please sign in to comment.