Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add paris ticket banner #3363

Merged
merged 4 commits into from
Nov 11, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions components/campaigns/banners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ export function shouldShowBanner(cfpDeadline: string) {

export const banners = [
{
title: "AsyncAPI Online Conference'24",
city: 'YouTube',
dateLocation: '30th of October, 2024 | YouTube & LinkedIn',
cfaText: 'Join us Live',
eventName: 'the AsyncAPI Online Conference',
cfpDeadline: '2024-10-30T06:00:00Z',
link: 'https://www.youtube.com/live/F9wHxd-v2f0?si=kPCqgUzqAKC0FaqJ'
title: "AsyncAPI Conference",
city: 'Paris Edition',
dateLocation: '5th of December, 2024 | France, Paris',
cfaText: 'Get Your Tickets',
eventName: 'the AsyncAPI Conf in Paris',
cfpDeadline: '2024-12-01T06:00:00Z',
link: 'https://conference.asyncapi.com/#tickets'
Copy link

@coderabbitai coderabbitai bot Nov 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider lazy loading the banner for better performance

Given the low Lighthouse performance score (46), consider implementing lazy loading for the banner component to improve initial page load time.

Example implementation:

// In a separate file: components/campaigns/AsyncBanner.tsx
import dynamic from 'next/dynamic'

export const AsyncBanner = dynamic(() => import('./Banner'), {
  loading: () => null,
  ssr: false
})

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will handle this in a separate issue

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@akshatnema, understood. Would you like me to create a new GitHub issue to track this optimization for future implementation?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is an existing issue for this

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@akshatnema, understood. Thank you for letting me know that there is an existing issue for this.

}
];
Loading