Skip to content

Commit

Permalink
Merge branch 'master' into CssAlign
Browse files Browse the repository at this point in the history
  • Loading branch information
akshatnema authored Nov 30, 2024
2 parents 382b7b9 + 391482d commit 9441ca8
Show file tree
Hide file tree
Showing 11 changed files with 205 additions and 161 deletions.
4 changes: 2 additions & 2 deletions 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 React, { useLayoutEffect, useState } from 'react';
import React, { useEffect, useState } from 'react';
import {
TwitterDMButton,
TwitterFollowButton,
Expand Down Expand Up @@ -97,7 +97,7 @@ function MermaidDiagram({ graph }: MermaidDiagramProps) {
/**
* @description Renders the Mermaid diagram.
*/
useLayoutEffect(() => {
useEffect(() => {
if (!graph) {
return;
}
Expand Down
29 changes: 16 additions & 13 deletions components/NewsletterSubscribe.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { useTranslation } from 'next-i18next';
import React, { useState } from 'react';

import IconCircularLoader from '@/components/icons/CircularLoader';
import { ButtonType } from '@/types/components/buttons/ButtonPropsType';
import { InputTypes } from '@/types/components/InputBoxPropsType';
import { HeadingLevel, HeadingTypeStyle } from '@/types/typography/Heading';

import { useTranslation } from '../utils/i18n';
import Button from './buttons/Button';
import InputBox from './InputBox';
import Loader from './Loader';
Expand All @@ -26,6 +26,7 @@ interface NewsletterSubscribeProps {
title?: string;
subtitle?: string;
type?: string;
errorSubtitle?: string;
}

/**
Expand All @@ -37,19 +38,21 @@ interface NewsletterSubscribeProps {
* @param {string} props.title - The title of the Subscribe card.
* @param {string} props.subtitle - The subtitle of the Subscribe card.
* @param {string} props.type - The type of subscription.
* @param {string} props.errorSubtitle - The error subtitle to be displayed.
*/
export default function NewsletterSubscribe({
className = 'p-8 text-center text-black',
dark = false,
title = 'Subscribe to our newsletter to receive news about AsyncAPI.',
subtitle = 'We respect your inbox. No spam, promise ✌️',
type = 'Newsletter'
type = 'Newsletter',
errorSubtitle = 'Subscription failed, please let us know about it by submitting a bug'
}: NewsletterSubscribeProps) {
const [email, setEmail] = useState<string>('');
const [name, setName] = useState<string>('');
const [status, setStatus] = useState<FormStatus>(FormStatus.NORMAL);

const { t } = useTranslation('common');
const { t, ready } = useTranslation('common', { keyPrefix: 'newsletterCTA' });

const headTextColor = dark ? 'text-white' : '';
const paragraphTextColor = dark ? 'text-gray-300' : '';
Expand Down Expand Up @@ -94,10 +97,10 @@ export default function NewsletterSubscribe({
return (
<div className={className} data-testid='NewsletterSubscribe-main'>
<Heading level={HeadingLevel.h3} textColor={headTextColor} typeStyle={HeadingTypeStyle.lg} className='mb-4'>
{t('newsletterCTA.successTitle')}
{ready ? t('successTitle') : 'Thank you for subscribing!'}
</Heading>
<Paragraph className='mb-8' textColor={paragraphTextColor}>
{t('newsletterCTA.subtitle')}
{ready ? t('subtitle') : subtitle}
</Paragraph>
</div>
);
Expand All @@ -107,12 +110,12 @@ export default function NewsletterSubscribe({
return (
<div className={className} data-testid='NewsletterSubscribe-main'>
<Heading level={HeadingLevel.h3} textColor={headTextColor} typeStyle={HeadingTypeStyle.lg} className='mb-4'>
{t('newsletterCTA.errorTitle')}
{ready ? t('errorTitle') : 'Something went wrong'}
</Heading>
<Paragraph className='mb-8' textColor={paragraphTextColor}>
{t('newsletterCTA.errorSubtitle')}{' '}
{ready ? t('errorSubtitle') : errorSubtitle}{' '}
<TextLink href='https://github.com/asyncapi/website/issues/new?template=bug.md' target='_blank'>
{t('newsletterCTA.errorLinkText')}
{ready ? t('errorLinkText') : 'here'}
</TextLink>
</Paragraph>
</div>
Expand All @@ -122,10 +125,10 @@ export default function NewsletterSubscribe({
return (
<div className={className} data-testid='NewsletterSubscribe-main'>
<Heading level={HeadingLevel.h3} textColor={headTextColor} typeStyle={HeadingTypeStyle.lg} className='mb-4'>
{title}
{ready ? t('title') : title}
</Heading>
<Paragraph className='mb-8' textColor={paragraphTextColor}>
{subtitle}
{ready ? t('subtitle') : subtitle}
</Paragraph>
{status === 'loading' ? (
<Loader loaderText={'Waiting for response...'} loaderIcon={<IconCircularLoader dark />} dark={dark} />
Expand All @@ -134,20 +137,20 @@ export default function NewsletterSubscribe({
<InputBox
inputType={InputTypes.TEXT}
inputName='name'
placeholder={t('newsletterCTA.nameInput')}
placeholder={ready ? t('nameInput') : 'Your name'}
inputValue={name}
setInput={setName}
/>
<InputBox
inputType={InputTypes.EMAIL}
inputName='email'
placeholder={t('newsletterCTA.emailInput')}
placeholder={ready ? t('emailInput') : 'Your email'}
inputValue={email}
setInput={setEmail}
/>
<Button
type={ButtonType.SUBMIT}
text={t('newsletterCTA.subscribeBtn')}
text={ready ? t('subscribeBtn') : 'Subscribe'}
className='mt-2 w-full md:mr-2 md:mt-0 md:flex-1'
href=''
/>
Expand Down
2 changes: 1 addition & 1 deletion components/data/buckets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const buckets: Bucket[] = [
name: 'Explorer',
title: 'Specification Explorer',
description: 'Simplifying our Specification JSON Schema like a pro.',
link: '/docs/reference/specification/v3.0.0-Explorer',
link: '/docs/reference/specification/v3.0.0-explorer',
className: 'bg-teal-200',
borderClassName: 'border-orange-200',
icon: IconExplorer
Expand Down
28 changes: 26 additions & 2 deletions config/finance/2024/Expenses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,36 @@ August:
- Category: Community Manager
Amount: '2000.00'
- Category: Bounty Program
Amount: '1600.00'
Amount: '1800.00'
- Category: Swag Store
Amount: '2556.42'
- Category: Community Marketing Specialist
Amount: '2000.00'
- Category: 3rd Party Services
Amount: '1354.35'
- Category: AsyncAPI Conf on Tour 2024
Amount: '1384.70'
Amount: '1384.70'
September:
- Category: Bounty Program
Amount: '3000.00'
- Category: Swag Store
Amount: '736.59'
- Category: Community Manager
Amount: '2000.00'
- Category: Community Marketing Specialist
Amount: '2000.00'
- Category: JSON Schema Sponsorship
Amount: '250.00'
October:
- Category: Bounty Program
Amount: '1000.00'
- Category: Swag Store
Amount: '882.12'
- Category: AsyncAPI Conf on Tour 2024
Amount: '962.01'
- Category: Community Manager
Amount: '2000.00'
- Category: Community Marketing Specialist
Amount: '2000.00'
- Category: JSON Schema Sponsorship
Amount: '250.00'
14 changes: 7 additions & 7 deletions config/meetings.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
[
{
"title": "Community Meeting",
"calLink": "https://www.google.com/calendar/event?eid=cnIwc3U0c2o1a3FoaWM0M2VvZXFjNzJvZzQgY19xOXRzZWlnbG9tZHNqNm5qdWh2YnB0czExY0Bn",
"url": "https://github.com/asyncapi/community/issues/1336",
"banner": "https://github.com/user-attachments/assets/7756ebe2-f8c7-4bda-91e3-6a678c1fad99",
"date": "2024-08-20T16:00:00.000Z"
},
{
"title": "Essential Building Blocks Working Group",
"calLink": "https://www.google.com/calendar/event?eid=c28zazMxcDk3MThpMWFpNG9lYzRrbmIzNW8gY19xOXRzZWlnbG9tZHNqNm5qdWh2YnB0czExY0Bn",
Expand Down Expand Up @@ -138,5 +131,12 @@
"url": "https://github.com/asyncapi/community/issues/1596",
"banner": "https://github.com/user-attachments/assets/ff469484-a2c5-4aa2-8652-782f017947fb",
"date": "2024-11-26T16:00:00.000Z"
},
{
"title": "AsyncAPI Mentorship Program Kick-Off",
"calLink": "https://www.google.com/calendar/event?eid=aGg5cGtwdGV0YmpzbnBlcmdwYjFqMjU1cTQgY19xOXRzZWlnbG9tZHNqNm5qdWh2YnB0czExY0Bn",
"url": "https://github.com/asyncapi/community/issues/1599",
"banner": "https://github.com/user-attachments/assets/739381b2-b7de-4e08-b845-04e5a07ba7e0",
"date": "2024-12-03T13:00:00.000Z"
}
]
12 changes: 6 additions & 6 deletions config/newsroom_videos.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
[
{
"image_url": "https://i.ytimg.com/vi/XirMXiBNaBM/hqdefault.jpg",
"title": "Community Meeting, 16:00 UTC Tuesday November 26th 2024",
"description": "",
"videoId": "XirMXiBNaBM"
},
{
"image_url": "https://i.ytimg.com/vi/Q2cvxsUUgzA/hqdefault.jpg",
"title": "AsyncAPI-Powered Event Feeds: 3 Steps to Streaming",
Expand All @@ -22,11 +28,5 @@
"title": "AsyncAPI and DDD - A Pretty Couple - Dr. Annegret Junker",
"description": "",
"videoId": "lCTdXmougTk"
},
{
"image_url": "https://i.ytimg.com/vi/b_BStEcLNqg/hqdefault.jpg",
"title": "Sustaining Open Source Beyond Code: The Importance of Marketing and Funding - Oluwabamikemi Kayode",
"description": "",
"videoId": "b_BStEcLNqg"
}
]
Loading

0 comments on commit 9441ca8

Please sign in to comment.