Skip to content

feat: fixed alignment of announcement banner #4031

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

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

Pushkar780
Copy link

@Pushkar780 Pushkar780 commented Apr 8, 2025

Before:
image

After:
image

Also, fixed missing annoucement banner on ambassador page.
Related issue(s)
Closes #4021

Co-authored by: Siddhant

Summary by CodeRabbit

  • Style
    • Enhanced the visual presentation of the announcement banner with refined spacing, button placement, sizing, and responsiveness.
    • Corrected CSS syntax in global styles for improved integrity.
  • New Features
    • Updated the ambassadors page to now display the banner for improved user engagement.

Copy link

netlify bot commented Apr 8, 2025

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit c4ca4b5
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-website/deploys/6808b0961bd3460008836967
😎 Deploy Preview https://deploy-preview-4031--asyncapi-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

coderabbitai bot commented Apr 8, 2025

Walkthrough

This pull request updates the announcement banner’s presentation across the site. In the AnnouncementHero.tsx component, the logic for determining visible banners and managing automatic transitions has been enhanced. The ambassadors page now shows the banner by changing the hideBanner property in the layout from true to false. Additionally, styling adjustments have been made to improve the visual presentation of the component. No changes were made to the exported entities.

Changes

Files Change Summary
components/campaigns/AnnouncementHero.tsx Adjusted banner logic: modified useEffect for managing visible banners and intervals, updated layout & styling including navigation buttons and responsive dimensions.
pages/community/ambassadors/[id].tsx Changed the hideBanner property in GenericLayout from true to false to ensure the announcement banner is displayed.
package.json Added a newline character at the end of the file for formatting.
styles/globals.css Added a closing curly brace for the select CSS rule and a newline character at the end of the file for formatting.

Assessment against linked issues

Objective Addressed Explanation
Consistent banner visibility on Ambassador pages (#4021)
Proper banner alignment and styling for the announcement banner (#4021)

Possibly related PRs

  • feat: optimize banner rendering performance #3519: The changes in the main PR enhance the functionality and styling of the AnnouncementHero component, while the retrieved PR optimizes the rendering logic within the same component, indicating a direct relationship in their modifications.
  • feat: add venue cfp banners #3976: The changes in the main PR are related to those in the retrieved PR as both modify the AnnouncementHero component, specifically in the logic and functionality concerning banner visibility and transitions.
  • fix: banner overlapping with Navbar #4013: The changes in the main PR for the AnnouncementHero component's layout and styling are related to the modifications in the AnnouncementBanner component's class names, as both PRs aim to improve the visual presentation and alignment of banner elements within the UI.

Suggested labels

ready-to-merge

Suggested reviewers

  • derberg
  • akshatnema
  • Mayaleeeee
  • asyncapi-bot-eve
  • devilkiller-ag
  • sambhavgupta0705
  • vishvamsinh28

Poem

I'm a little rabbit, hopping with delight,
Tweaking banner styles from morning till night.
Navigation buttons now dance in perfect array,
And ambassadors see banners on display.
Code carrots so crunchy, making our site shine bright!
Hop on, dear coder, and relish the sight.
🥕🐰


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f6dcee8 and c46b060.

📒 Files selected for processing (1)
  • components/campaigns/AnnouncementHero.tsx (4 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • components/campaigns/AnnouncementHero.tsx

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🧹 Nitpick comments (1)
components/campaigns/AnnouncementHero.tsx (1)

91-92: Use Tailwind shorthand for size

According to the linting warnings, you can use the shorthand size-2 instead of specifying both h-2 and w-2 separately.

-            className={`mx-1 h-2 w-2 cursor-pointer rounded-full ${
+            className={`mx-1 size-2 cursor-pointer rounded-full ${
🧰 Tools
🪛 ESLint

[error] 91-91: Insert ····

(prettier/prettier)


[error] 92-92: Replace ·············· with ··················

(prettier/prettier)

🪛 GitHub Actions: PR testing - if Node project

[error] 91-91: Insert ···· prettier/prettier


[warning] 91-91: Classnames 'h-2, w-2' could be replaced by the 'size-2' shorthand! tailwindcss/enforces-shorthand


[error] 92-92: Replace ·············· with ·················· prettier/prettier

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ac42663 and 7529177.

📒 Files selected for processing (2)
  • components/campaigns/AnnouncementHero.tsx (1 hunks)
  • pages/community/ambassadors/[id].tsx (1 hunks)
🧰 Additional context used
🧬 Code Definitions (1)
components/campaigns/AnnouncementHero.tsx (2)
components/icons/ArrowLeft.tsx (1)
  • ArrowLeft (7-17)
components/campaigns/AnnouncementBanner.tsx (1)
  • Banner (37-69)
🪛 ESLint
components/campaigns/AnnouncementHero.tsx

[error] 53-53: Insert ····

(prettier/prettier)


[error] 54-54: Insert ····

(prettier/prettier)


[error] 55-55: Insert ····

(prettier/prettier)


[error] 56-56: Insert ····

(prettier/prettier)


[error] 56-56: Strings must use singlequote.

(quotes)


[error] 57-57: Insert ····

(prettier/prettier)


[error] 58-58: Insert ····

(prettier/prettier)


[error] 59-59: Replace ········ with ············

(prettier/prettier)


[error] 60-60: Insert ····

(prettier/prettier)


[error] 61-61: Replace ···· with ········

(prettier/prettier)


[error] 62-62: Insert ····

(prettier/prettier)


[error] 63-63: Replace ······ with ··········

(prettier/prettier)


[error] 64-64: Insert ····

(prettier/prettier)


[error] 64-66: Block must not be padded by blank lines.

(padded-blocks)


[error] 65-65: Trailing spaces not allowed.

(no-trailing-spaces)


[error] 65-66: Replace ·····⏎·········· with ·········

(prettier/prettier)


[error] 68-68: Insert ····

(prettier/prettier)


[error] 70-70: Replace ·········· with ··············

(prettier/prettier)


[error] 71-71: Insert ····

(prettier/prettier)


[error] 72-72: Replace ·············· with ··················

(prettier/prettier)


[error] 73-73: Insert ····

(prettier/prettier)


[error] 74-74: Insert ····

(prettier/prettier)


[error] 75-75: Replace ·············· with ··················

(prettier/prettier)


[error] 76-76: Insert ····

(prettier/prettier)


[error] 77-77: Replace ·············· with ··················

(prettier/prettier)


[error] 78-78: Insert ····

(prettier/prettier)


[error] 79-79: Insert ····

(prettier/prettier)


[error] 80-80: Replace ·············· with ··················

(prettier/prettier)


[error] 81-81: Insert ····

(prettier/prettier)


[error] 82-82: Replace ·············· with ··················

(prettier/prettier)


[error] 83-83: Insert ····

(prettier/prettier)


[error] 84-84: Insert ····

(prettier/prettier)


[error] 85-85: Replace ········ with ············

(prettier/prettier)


[error] 86-86: Insert ····

(prettier/prettier)


[error] 87-87: Insert ····

(prettier/prettier)


[error] 88-88: Insert ····

(prettier/prettier)


[error] 89-89: Insert ····

(prettier/prettier)


[error] 90-90: Insert ····

(prettier/prettier)


[error] 91-91: Insert ····

(prettier/prettier)


[error] 92-92: Replace ·············· with ··················

(prettier/prettier)


[error] 93-93: Insert ····

(prettier/prettier)


[error] 94-94: Insert ····

(prettier/prettier)


[error] 95-95: Replace ·········· with ··············

(prettier/prettier)


[error] 96-96: Insert ····

(prettier/prettier)


[error] 97-97: Replace ······ with ··········

(prettier/prettier)


[error] 98-98: Insert ····

(prettier/prettier)


[error] 99-99: Insert ····

(prettier/prettier)


[error] 100-100: Insert ····

(prettier/prettier)


[error] 101-101: Insert ····

(prettier/prettier)


[error] 101-101: Strings must use singlequote.

(quotes)


[error] 102-102: Replace ········ with ············

(prettier/prettier)


[error] 103-103: Insert ····

(prettier/prettier)


[error] 104-104: Insert ····

(prettier/prettier)


[error] 105-105: Insert ····

(prettier/prettier)


[error] 106-106: Insert ····

(prettier/prettier)


[error] 107-107: Insert ····

(prettier/prettier)


[error] 108-108: Insert ····

(prettier/prettier)


[error] 110-110: Newline required at end of file but not found.

(eol-last)


[error] 110-110: Insert

(prettier/prettier)

🪛 GitHub Actions: PR testing - if Node project
components/campaigns/AnnouncementHero.tsx

[error] 53-53: Insert ···· prettier/prettier


[error] 54-54: Insert ···· prettier/prettier


[error] 55-55: Insert ···· prettier/prettier


[error] 56-56: Insert ···· prettier/prettier


[error] 56-56: Strings must use singlequote. quotes


[error] 57-57: Insert ···· prettier/prettier


[error] 58-58: Insert ···· prettier/prettier


[error] 59-59: Replace ········ with ············ prettier/prettier


[error] 60-60: Insert ···· prettier/prettier


[error] 61-61: Replace ···· with ········ prettier/prettier


[error] 62-62: Insert ···· prettier/prettier


[error] 63-63: Replace ······ with ·········· prettier/prettier


[error] 64-64: Insert ···· prettier/prettier


[error] 65-65: Trailing spaces not allowed. no-trailing-spaces


[error] 66-66: Replace ·····⏎·········· with ········· prettier/prettier


[error] 68-68: Insert ···· prettier/prettier


[error] 70-70: Replace ·········· with ·············· prettier/prettier


[error] 71-71: Insert ···· prettier/prettier


[error] 72-72: Replace ·············· with ·················· prettier/prettier


[error] 73-73: Insert ···· prettier/prettier


[error] 74-74: Insert ···· prettier/prettier


[error] 75-75: Replace ·············· with ·················· prettier/prettier


[error] 76-76: Insert ···· prettier/prettier


[error] 77-77: Replace ·············· with ·················· prettier/prettier


[error] 78-78: Insert ···· prettier/prettier


[error] 79-79: Insert ···· prettier/prettier


[error] 80-80: Replace ·············· with ·················· prettier/prettier


[error] 81-81: Insert ···· prettier/prettier


[error] 82-82: Replace ·············· with ·················· prettier/prettier


[error] 83-83: Insert ···· prettier/prettier


[error] 84-84: Insert ···· prettier/prettier


[error] 85-85: Replace ········ with ············ prettier/prettier


[error] 86-86: Insert ···· prettier/prettier


[error] 87-87: Insert ···· prettier/prettier


[error] 88-88: Insert ···· prettier/prettier


[error] 89-89: Insert ···· prettier/prettier


[error] 90-90: Insert ···· prettier/prettier


[error] 91-91: Insert ···· prettier/prettier


[warning] 91-91: Classnames 'h-2, w-2' could be replaced by the 'size-2' shorthand! tailwindcss/enforces-shorthand


[error] 92-92: Replace ·············· with ·················· prettier/prettier


[error] 93-93: Insert ···· prettier/prettier


[error] 94-94: Insert ···· prettier/prettier


[error] 95-95: Replace ·········· with ·············· prettier/prettier


[error] 96-96: Insert ···· prettier/prettier


[error] 97-97: Replace ······ with ·········· prettier/prettier


[error] 98-98: Insert ···· prettier/prettier


[error] 99-99: Insert ···· prettier/prettier


[error] 100-100: Insert ···· prettier/prettier


[warning] 101-101: Classnames 'h-8, w-8' could be replaced by the 'size-8' shorthand! tailwindcss/enforces-shorthand


[warning] 101-101: The arbitrary class 'right-[-1.5rem], sm:right-[-2rem], lg:right-[-2.5rem]' could be replaced by '-right-6, sm:-right-8, lg:-right-10' tailwindcss/no-unnecessary-arbitrary-value


[error] 102-102: Strings must use singlequote. quotes


[error] 103-103: Replace ········ with ············ prettier/prettier


[error] 104-104: Insert ···· prettier/prettier


[error] 105-105: Insert ···· prettier/prettier


[error] 106-106: Insert ···· prettier/prettier


[error] 107-107: Insert ···· prettier/prettier


[error] 108-108: Insert ···· prettier/prettier


[error] 110-110: Newline required at end of file but not found. eol-last

⏰ Context from checks skipped due to timeout of 180000ms (3)
  • GitHub Check: Redirect rules - asyncapi-website
  • GitHub Check: Header rules - asyncapi-website
  • GitHub Check: Pages changed - asyncapi-website
🔇 Additional comments (4)
pages/community/ambassadors/[id].tsx (1)

67-67: Banner visibility restored to ambassador pages

The banner is now correctly displayed on the ambassador pages by changing hideBanner from true to false. This change aligns with the PR objective of ensuring the announcement banner appears consistently across all relevant pages of the website.

components/campaigns/AnnouncementHero.tsx (3)

53-53: Improved overflow handling for banner navigation

The change from overflow-x-hidden to overflow-visible allows the navigation controls to extend beyond the container boundaries, improving the visual presentation of the banner.

🧰 Tools
🪛 ESLint

[error] 53-53: Insert ····

(prettier/prettier)

🪛 GitHub Actions: PR testing - if Node project

[error] 53-53: Insert ···· prettier/prettier


62-85: Improved banner layout with responsive sizing

The changes to the banner layout improve its responsiveness across different screen sizes. The adjustments to width, min-height, and container structure provide better visual balance.

🧰 Tools
🪛 ESLint

[error] 62-62: Insert ····

(prettier/prettier)


[error] 63-63: Replace ······ with ··········

(prettier/prettier)


[error] 64-64: Insert ····

(prettier/prettier)


[error] 64-66: Block must not be padded by blank lines.

(padded-blocks)


[error] 65-65: Trailing spaces not allowed.

(no-trailing-spaces)


[error] 65-66: Replace ·····⏎·········· with ·········

(prettier/prettier)


[error] 68-68: Insert ····

(prettier/prettier)


[error] 70-70: Replace ·········· with ··············

(prettier/prettier)


[error] 71-71: Insert ····

(prettier/prettier)


[error] 72-72: Replace ·············· with ··················

(prettier/prettier)


[error] 73-73: Insert ····

(prettier/prettier)


[error] 74-74: Insert ····

(prettier/prettier)


[error] 75-75: Replace ·············· with ··················

(prettier/prettier)


[error] 76-76: Insert ····

(prettier/prettier)


[error] 77-77: Replace ·············· with ··················

(prettier/prettier)


[error] 78-78: Insert ····

(prettier/prettier)


[error] 79-79: Insert ····

(prettier/prettier)


[error] 80-80: Replace ·············· with ··················

(prettier/prettier)


[error] 81-81: Insert ····

(prettier/prettier)


[error] 82-82: Replace ·············· with ··················

(prettier/prettier)


[error] 83-83: Insert ····

(prettier/prettier)


[error] 84-84: Insert ····

(prettier/prettier)


[error] 85-85: Replace ········ with ············

(prettier/prettier)

🪛 GitHub Actions: PR testing - if Node project

[error] 62-62: Insert ···· prettier/prettier


[error] 63-63: Replace ······ with ·········· prettier/prettier


[error] 64-64: Insert ···· prettier/prettier


[error] 65-65: Trailing spaces not allowed. no-trailing-spaces


[error] 66-66: Replace ·····⏎·········· with ········· prettier/prettier


[error] 68-68: Insert ···· prettier/prettier


[error] 70-70: Replace ·········· with ·············· prettier/prettier


[error] 71-71: Insert ···· prettier/prettier


[error] 72-72: Replace ·············· with ·················· prettier/prettier


[error] 73-73: Insert ···· prettier/prettier


[error] 74-74: Insert ···· prettier/prettier


[error] 75-75: Replace ·············· with ·················· prettier/prettier


[error] 76-76: Insert ···· prettier/prettier


[error] 77-77: Replace ·············· with ·················· prettier/prettier


[error] 78-78: Insert ···· prettier/prettier


[error] 79-79: Insert ···· prettier/prettier


[error] 80-80: Replace ·············· with ·················· prettier/prettier


[error] 81-81: Insert ···· prettier/prettier


[error] 82-82: Replace ·············· with ·················· prettier/prettier


[error] 83-83: Insert ···· prettier/prettier


[error] 84-84: Insert ···· prettier/prettier


[error] 85-85: Replace ········ with ············ prettier/prettier


87-97: Enhanced navigation indicators

The updated styling for the navigation indicators at the bottom of the banner provides better visual feedback to users about which announcement is currently displayed.

🧰 Tools
🪛 ESLint

[error] 87-87: Insert ····

(prettier/prettier)


[error] 88-88: Insert ····

(prettier/prettier)


[error] 89-89: Insert ····

(prettier/prettier)


[error] 90-90: Insert ····

(prettier/prettier)


[error] 91-91: Insert ····

(prettier/prettier)


[error] 92-92: Replace ·············· with ··················

(prettier/prettier)


[error] 93-93: Insert ····

(prettier/prettier)


[error] 94-94: Insert ····

(prettier/prettier)


[error] 95-95: Replace ·········· with ··············

(prettier/prettier)


[error] 96-96: Insert ····

(prettier/prettier)


[error] 97-97: Replace ······ with ··········

(prettier/prettier)

🪛 GitHub Actions: PR testing - if Node project

[error] 87-87: Insert ···· prettier/prettier


[error] 88-88: Insert ···· prettier/prettier


[error] 89-89: Insert ···· prettier/prettier


[error] 90-90: Insert ···· prettier/prettier


[error] 91-91: Insert ···· prettier/prettier


[warning] 91-91: Classnames 'h-2, w-2' could be replaced by the 'size-2' shorthand! tailwindcss/enforces-shorthand


[error] 92-92: Replace ·············· with ·················· prettier/prettier


[error] 93-93: Insert ···· prettier/prettier


[error] 94-94: Insert ···· prettier/prettier


[error] 95-95: Replace ·········· with ·············· prettier/prettier


[error] 96-96: Insert ···· prettier/prettier


[error] 97-97: Replace ······ with ·········· prettier/prettier

Comment on lines 64 to 66
{visibleBanners.map((banner, index) => {

const isVisible = index === activeIndex;
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Remove unnecessary whitespace

There's trailing whitespace on line 65 causing a linting error.

Apply this diff to remove the whitespace:

        {visibleBanners.map((banner, index) => {
-          
          const isVisible = index === activeIndex;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{visibleBanners.map((banner, index) => {
const isVisible = index === activeIndex;
{visibleBanners.map((banner, index) => {
const isVisible = index === activeIndex;
🧰 Tools
🪛 ESLint

[error] 64-64: Insert ····

(prettier/prettier)


[error] 64-66: Block must not be padded by blank lines.

(padded-blocks)


[error] 65-65: Trailing spaces not allowed.

(no-trailing-spaces)


[error] 65-66: Replace ·····⏎·········· with ·········

(prettier/prettier)

🪛 GitHub Actions: PR testing - if Node project

[error] 64-64: Insert ···· prettier/prettier


[error] 65-65: Trailing spaces not allowed. no-trailing-spaces


[error] 66-66: Replace ·····⏎·········· with ········· prettier/prettier

Comment on lines 56 to 61
className={`absolute left-[-1.5rem] top-1/2 z-30 flex h-8 w-8 -translate-y-1/2 cursor-pointer items-center justify-center rounded-full bg-primary-500 opacity-75 hover:bg-primary-600 sm:left-[-2rem] lg:left-[-2.5rem]`}
onClick={goToPrevious}
>
<ArrowLeft className='text-white' />
</div>
)}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Navigation buttons need formatting fixes

The navigation buttons have improved positioning and visibility, but there are formatting issues that need to be addressed:

  1. Double quotes instead of single quotes in the className string
  2. Indentation issues that are causing pipeline failures

Apply this diff to fix the formatting issues:

-        className={`absolute left-[-1.5rem] top-1/2 z-30 flex h-8 w-8 -translate-y-1/2 cursor-pointer items-center justify-center rounded-full bg-primary-500 opacity-75 hover:bg-primary-600 sm:left-[-2rem] lg:left-[-2.5rem]`}
+        className={'absolute left-[-1.5rem] top-1/2 z-30 flex h-8 w-8 -translate-y-1/2 cursor-pointer items-center justify-center rounded-full bg-primary-500 opacity-75 hover:bg-primary-600 sm:left-[-2rem] lg:left-[-2.5rem]'}

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 ESLint

[error] 56-56: Insert ····

(prettier/prettier)


[error] 56-56: Strings must use singlequote.

(quotes)


[error] 57-57: Insert ····

(prettier/prettier)


[error] 58-58: Insert ····

(prettier/prettier)


[error] 59-59: Replace ········ with ············

(prettier/prettier)


[error] 60-60: Insert ····

(prettier/prettier)


[error] 61-61: Replace ···· with ········

(prettier/prettier)

🪛 GitHub Actions: PR testing - if Node project

[error] 56-56: Insert ···· prettier/prettier


[error] 56-56: Strings must use singlequote. quotes


[error] 57-57: Insert ···· prettier/prettier


[error] 58-58: Insert ···· prettier/prettier


[error] 59-59: Replace ········ with ············ prettier/prettier


[error] 60-60: Insert ···· prettier/prettier


[error] 61-61: Replace ···· with ········ prettier/prettier

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 10

🔭 Outside diff range comments (1)
components/campaigns/AnnouncementHero.tsx (1)

122-123: ⚠️ Potential issue

Add newline at end of file

}
+
🧹 Nitpick comments (2)
components/campaigns/AnnouncementHero.tsx (2)

69-69: Optimize left navigation button styling

The increased z-index (from 10 to 30) and opacity (from 50% to 75%) improve visibility, but there are formatting and optimization opportunities.

Apply this diff to use Tailwind shortcuts and single quotes:

-            className={`absolute left-[-1.5rem] top-1/2 z-30 flex h-8 w-8 -translate-y-1/2 cursor-pointer items-center justify-center rounded-full bg-primary-500 opacity-75 hover:bg-primary-600 sm:left-[-2rem] lg:left-[-2.5rem]`}
+            className={'absolute -left-6 top-1/2 z-30 flex size-8 -translate-y-1/2 cursor-pointer items-center justify-center rounded-full bg-primary-500 opacity-75 hover:bg-primary-600 sm:-left-8 lg:-left-10'}
🧰 Tools
🪛 ESLint

[error] 69-69: Strings must use singlequote.

(quotes)

🪛 GitHub Actions: PR testing - if Node project

[warning] 69-13: Classnames 'h-8, w-8' could be replaced by the 'size-8' shorthand! tailwindcss/enforces-shorthand


[warning] 69-13: The arbitrary class 'left-[-1.5rem], sm:left-[-2rem], lg:left-[-2.5rem]' could be replaced by '-left-6, sm:-left-8, lg:-left-10' tailwindcss/no-unnecessary-arbitrary-value


[error] 69-24: Strings must use singlequote. quotes


[error] 72-34: Replace "text-white" with 'text-white' prettier/prettier


[error] 72-34: Unexpected usage of doublequote. jsx-quotes


[warning] 75-14: Invalid Tailwind CSS classnames order tailwindcss/classnames-order


[error] 75-24: Replace "relative·flex·w-full·px-4·xs:w-11/12·sm:w-4/5·md:w-5/6·lg:w-3/4·flex-col·items-center·justify-center·gap-4" with 'relative·flex·w-full·px-4·xs:w-11/12·sm:w-4/5·md:w-5/6·lg:w-3/4·flex-col·items-center·justify-center·gap-4' prettier/prettier


[error] 75-24: Unexpected usage of doublequote. jsx-quotes


[warning] 76-16: Invalid Tailwind CSS classnames order tailwindcss/classnames-order


[error] 76-26: Replace "relative·flex·min-h-72·w-full·justify-center·overflow-hidden·sm:min-h-56·lg:min-h-64·lg:h-[20rem]·lg:w-[42rem]" with 'relative·flex·min-h-72·w-full·justify-center·overflow-hidden·sm:min-h-56·lg:min-h-64·lg:h-[20rem]·lg:w-[42rem]' prettier/prettier


[error] 76-26: Unexpected usage of doublequote. jsx-quotes


[error] 99-26: Replace "m-auto·flex·justify-center" with 'm-auto·flex·justify-center' prettier/prettier


[error] 99-26: Unexpected usage of doublequote. jsx-quotes


[warning] 113-13: Classnames 'h-8, w-8' could be replaced by the 'size-8' shorthand! tailwindcss/enforces-shorthand


[warning] 113-13: The arbitrary class 'right-[-1.5rem], sm:right-[-2rem], lg:right-[-2.5rem]' could be replaced by '-right-6, sm:-right-8, lg:-right-10' tailwindcss/no-unnecessary-arbitrary-value


[error] 113-24: Strings must use singlequote. quotes


[error] 116-35: Replace "text-white" with 'text-white' prettier/prettier


[error] 116-35: Unexpected usage of doublequote. jsx-quotes


113-113: Optimize right navigation button styling

Similar to the left button, this has improved visibility but needs formatting updates.

Apply this diff to use Tailwind shortcuts and single quotes:

-            className={`absolute right-[-1.5rem] top-1/2 z-30 flex h-8 w-8 -translate-y-1/2 cursor-pointer items-center justify-center rounded-full bg-primary-500 opacity-75 hover:bg-primary-600 sm:right-[-2rem] lg:right-[-2.5rem]`}
+            className={'absolute -right-6 top-1/2 z-30 flex size-8 -translate-y-1/2 cursor-pointer items-center justify-center rounded-full bg-primary-500 opacity-75 hover:bg-primary-600 sm:-right-8 lg:-right-10'}
🧰 Tools
🪛 ESLint

[error] 113-113: Strings must use singlequote.

(quotes)

🪛 GitHub Actions: PR testing - if Node project

[warning] 113-13: Classnames 'h-8, w-8' could be replaced by the 'size-8' shorthand! tailwindcss/enforces-shorthand


[warning] 113-13: The arbitrary class 'right-[-1.5rem], sm:right-[-2rem], lg:right-[-2.5rem]' could be replaced by '-right-6, sm:-right-8, lg:-right-10' tailwindcss/no-unnecessary-arbitrary-value


[error] 113-24: Strings must use singlequote. quotes


[error] 116-35: Replace "text-white" with 'text-white' prettier/prettier


[error] 116-35: Unexpected usage of doublequote. jsx-quotes

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7529177 and 060d4ef.

📒 Files selected for processing (1)
  • components/campaigns/AnnouncementHero.tsx (4 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
components/campaigns/AnnouncementHero.tsx (2)
components/campaigns/banners.ts (2)
  • banners (18-82)
  • shouldShowBanner (6-16)
components/icons/ArrowLeft.tsx (1)
  • ArrowLeft (7-17)
🪛 ESLint
components/campaigns/AnnouncementHero.tsx

[error] 21-24: Replace ⏎··className·=·'',⏎··small·=·false,⏎ with ·className·=·'',·small·=·false·

(prettier/prettier)


[error] 23-23: Unexpected trailing comma.

(comma-dangle)


[error] 27-30: Replace ⏎····()·=>·banners.filter((banner)·=>·shouldShowBanner(banner.cfpDeadline)),⏎····[banners],⏎·· with ()·=>·banners.filter((banner)·=>·shouldShowBanner(banner.cfpDeadline)),·[banners]

(prettier/prettier)


[error] 29-29: Unexpected trailing comma.

(comma-dangle)


[error] 34-36: Replace ⏎······prevIndex·===·0·?·numberOfVisibleBanners·-·1·:·prevIndex·-·1,⏎···· with ·(prevIndex·===·0·?·numberOfVisibleBanners·-·1·:·prevIndex·-·1)

(prettier/prettier)


[error] 35-35: Unexpected trailing comma.

(comma-dangle)


[error] 40-42: Replace ⏎······prevIndex·===·numberOfVisibleBanners·-·1·?·0·:·prevIndex·+·1,⏎···· with ·(prevIndex·===·numberOfVisibleBanners·-·1·?·0·:·prevIndex·+·1)

(prettier/prettier)


[error] 41-41: Unexpected trailing comma.

(comma-dangle)


[error] 50-53: Replace ⏎······()·=>·setActiveIndex((index)·=>·(index·+·1)·%·numberOfVisibleBanners),⏎······10000,⏎···· with ()·=>·setActiveIndex((index)·=>·(index·+·1)·%·numberOfVisibleBanners),·10000

(prettier/prettier)


[error] 52-52: Unexpected trailing comma.

(comma-dangle)


[error] 65-65: Replace "section"·padding=""·className="text-center" with 'section'·padding=''·className='text-center'

(prettier/prettier)


[error] 65-65: Unexpected usage of doublequote.

(jsx-quotes)


[error] 65-65: Unexpected usage of doublequote.

(jsx-quotes)


[error] 65-65: Unexpected usage of doublequote.

(jsx-quotes)


[error] 66-66: Replace "relative·flex·flex-row·items-center·justify-center·overflow-visible·gap-2·sm:gap-4" with 'relative·flex·flex-row·items-center·justify-center·overflow-visible·gap-2·sm:gap-4'

(prettier/prettier)


[error] 66-66: Unexpected usage of doublequote.

(jsx-quotes)


[error] 69-69: Strings must use singlequote.

(quotes)


[error] 72-72: Replace "text-white" with 'text-white'

(prettier/prettier)


[error] 72-72: Unexpected usage of doublequote.

(jsx-quotes)


[error] 75-75: Replace "relative·flex·w-full·px-4·xs:w-11/12·sm:w-4/5·md:w-5/6·lg:w-3/4·flex-col·items-center·justify-center·gap-4" with 'relative·flex·w-full·px-4·xs:w-11/12·sm:w-4/5·md:w-5/6·lg:w-3/4·flex-col·items-center·justify-center·gap-4'

(prettier/prettier)


[error] 75-75: Unexpected usage of doublequote.

(jsx-quotes)


[error] 76-76: Replace "relative·flex·min-h-72·w-full·justify-center·overflow-hidden·sm:min-h-56·lg:min-h-64·lg:h-[20rem]·lg:w-[42rem]" with 'relative·flex·min-h-72·w-full·justify-center·overflow-hidden·sm:min-h-56·lg:min-h-64·lg:h-[20rem]·lg:w-[42rem]'

(prettier/prettier)


[error] 76-76: Unexpected usage of doublequote.

(jsx-quotes)


[error] 99-99: Replace "m-auto·flex·justify-center" with 'm-auto·flex·justify-center'

(prettier/prettier)


[error] 99-99: Unexpected usage of doublequote.

(jsx-quotes)


[error] 113-113: Strings must use singlequote.

(quotes)


[error] 116-116: Replace "text-white" with 'text-white'

(prettier/prettier)


[error] 116-116: Unexpected usage of doublequote.

(jsx-quotes)

🪛 GitHub Actions: PR testing - if Node project
components/campaigns/AnnouncementHero.tsx

[error] 21-43: Replace ⏎··className·=·'',⏎··small·=·false,⏎ with ·className·=·'',·small·=·false· prettier/prettier


[error] 23-16: Unexpected trailing comma. comma-dangle


[error] 27-34: Replace ⏎····()·=>·banners.filter((banner)·=>·shouldShowBanner(banner.cfpDeadline)),⏎····[banners],⏎ with ()·=>·banners.filter((banner)·=>·shouldShowBanner(banner.cfpDeadline)),·[banners] prettier/prettier


[error] 29-14: Unexpected trailing comma. comma-dangle


[error] 34-34: Replace ⏎······prevIndex·===·0·?·numberOfVisibleBanners·-·1·:·prevIndex·-·1,⏎···· with ·(prevIndex·===·0·?·numberOfVisibleBanners·-·1·:·prevIndex·-·1) prettier/prettier


[error] 35-67: Unexpected trailing comma. comma-dangle


[error] 40-34: Replace ⏎······prevIndex·===·numberOfVisibleBanners·-·1·?·0·:·prevIndex·+·1,⏎···· with ·(prevIndex·===·numberOfVisibleBanners·-·1·?·0·:·prevIndex·+·1) prettier/prettier


[error] 41-67: Unexpected trailing comma. comma-dangle


[error] 50-34: Replace ⏎······()·=>·setActiveIndex((index)·=>·(index·+·1)·%·numberOfVisibleBanners),⏎······10000,⏎···· with ()·=>·setActiveIndex((index)·=>·(index·+·1)·%·numberOfVisibleBanners),·10000 prettier/prettier


[error] 52-12: Unexpected trailing comma. comma-dangle


[error] 65-19: Replace "section"·padding=""·className="text-center" with 'section'·padding=''·className='text-center' prettier/prettier


[error] 65-19: Unexpected usage of doublequote. jsx-quotes


[error] 66-12: Replace "relative·flex·flex-row·items-center·justify-center·overflow-visible·gap-2·sm:gap-4" with 'relative·flex·flex-row·items-center·justify-center·overflow-visible·gap-2·sm:gap-4' prettier/prettier


[error] 66-22: Unexpected usage of doublequote. jsx-quotes


[warning] 69-13: Classnames 'h-8, w-8' could be replaced by the 'size-8' shorthand! tailwindcss/enforces-shorthand


[warning] 69-13: The arbitrary class 'left-[-1.5rem], sm:left-[-2rem], lg:left-[-2.5rem]' could be replaced by '-left-6, sm:-left-8, lg:-left-10' tailwindcss/no-unnecessary-arbitrary-value


[error] 69-24: Strings must use singlequote. quotes


[error] 72-34: Replace "text-white" with 'text-white' prettier/prettier


[error] 72-34: Unexpected usage of doublequote. jsx-quotes


[warning] 75-14: Invalid Tailwind CSS classnames order tailwindcss/classnames-order


[error] 75-24: Replace "relative·flex·w-full·px-4·xs:w-11/12·sm:w-4/5·md:w-5/6·lg:w-3/4·flex-col·items-center·justify-center·gap-4" with 'relative·flex·w-full·px-4·xs:w-11/12·sm:w-4/5·md:w-5/6·lg:w-3/4·flex-col·items-center·justify-center·gap-4' prettier/prettier


[error] 75-24: Unexpected usage of doublequote. jsx-quotes


[warning] 76-16: Invalid Tailwind CSS classnames order tailwindcss/classnames-order


[error] 76-26: Replace "relative·flex·min-h-72·w-full·justify-center·overflow-hidden·sm:min-h-56·lg:min-h-64·lg:h-[20rem]·lg:w-[42rem]" with 'relative·flex·min-h-72·w-full·justify-center·overflow-hidden·sm:min-h-56·lg:min-h-64·lg:h-[20rem]·lg:w-[42rem]' prettier/prettier


[error] 76-26: Unexpected usage of doublequote. jsx-quotes


[error] 99-26: Replace "m-auto·flex·justify-center" with 'm-auto·flex·justify-center' prettier/prettier


[error] 99-26: Unexpected usage of doublequote. jsx-quotes


[warning] 113-13: Classnames 'h-8, w-8' could be replaced by the 'size-8' shorthand! tailwindcss/enforces-shorthand


[warning] 113-13: The arbitrary class 'right-[-1.5rem], sm:right-[-2rem], lg:right-[-2.5rem]' could be replaced by '-right-6, sm:-right-8, lg:-right-10' tailwindcss/no-unnecessary-arbitrary-value


[error] 113-24: Strings must use singlequote. quotes


[error] 116-35: Replace "text-white" with 'text-white' prettier/prettier


[error] 116-35: Unexpected usage of doublequote. jsx-quotes

🔇 Additional comments (1)
components/campaigns/AnnouncementHero.tsx (1)

103-103: Fix navigation indicator dot dimensions

The changes to the indicator dots look good.

🧰 Tools
🪛 GitHub Actions: PR testing - if Node project

[warning] 113-13: Classnames 'h-8, w-8' could be replaced by the 'size-8' shorthand! tailwindcss/enforces-shorthand


[warning] 113-13: The arbitrary class 'right-[-1.5rem], sm:right-[-2rem], lg:right-[-2.5rem]' could be replaced by '-right-6, sm:-right-8, lg:-right-10' tailwindcss/no-unnecessary-arbitrary-value


[error] 113-24: Strings must use singlequote. quotes


[error] 116-35: Replace "text-white" with 'text-white' prettier/prettier


[error] 116-35: Unexpected usage of doublequote. jsx-quotes

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

♻️ Duplicate comments (1)
components/campaigns/AnnouncementHero.tsx (1)

93-94: 🛠️ Refactor suggestion

Fix quote usage in navigation indicators container.

Double quotes are being used for JSX attributes, but the project's ESLint configuration requires single quotes.

-          <div className="m-auto flex justify-center">
+          <div className='m-auto flex justify-center'>
🧰 Tools
🪛 ESLint

[error] 93-93: Replace "m-auto·flex·justify-center" with 'm-auto·flex·justify-center'

(prettier/prettier)


[error] 93-93: Unexpected usage of doublequote.

(jsx-quotes)

🪛 GitHub Actions: PR testing - if Node project

[error] 93-93: Replace "m-auto·flex·justify-center" with 'm-auto·flex·justify-center' prettier/prettier

🧹 Nitpick comments (1)
components/campaigns/AnnouncementHero.tsx (1)

116-116: Missing newline at end of file.

Add a newline at the end of the file to fix the linting error.

}
+
🧰 Tools
🪛 ESLint

[error] 116-116: Newline required at end of file but not found.

(eol-last)


[error] 116-116: Insert

(prettier/prettier)

🪛 GitHub Actions: PR testing - if Node project

[error] 116-116: Newline required at end of file but not found. eol-last

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 060d4ef and ff7b467.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • components/campaigns/AnnouncementHero.tsx (4 hunks)
  • package.json (1 hunks)
  • styles/globals.css (9 hunks)
🧰 Additional context used
🪛 ESLint
components/campaigns/AnnouncementHero.tsx

[error] 24-27: Replace ⏎····()·=>·banners.filter((banner)·=>·shouldShowBanner(banner.cfpDeadline)),⏎····[]⏎·· with ()·=>·banners.filter((banner)·=>·shouldShowBanner(banner.cfpDeadline)),·[]

(prettier/prettier)


[error] 59-59: Replace "section"·padding=""·className="text-center" with 'section'·padding=''·className='text-center'

(prettier/prettier)


[error] 59-59: Unexpected usage of doublequote.

(jsx-quotes)


[error] 59-59: Unexpected usage of doublequote.

(jsx-quotes)


[error] 59-59: Unexpected usage of doublequote.

(jsx-quotes)


[error] 60-60: Replace "relative·flex·flex-row·items-center·justify-center·gap-2·overflow-visible·sm:gap-4" with 'relative·flex·flex-row·items-center·justify-center·gap-2·overflow-visible·sm:gap-4'

(prettier/prettier)


[error] 60-60: Unexpected usage of doublequote.

(jsx-quotes)


[error] 63-63: Replace "absolute·-left-6·top-1/2·z-30·flex·size-8·-translate-y-1/2·cursor-pointer·items-center·justify-center·rounded-full·bg-primary-500·opacity-75·hover:bg-primary-600·sm:-left-8·lg:-left-10" with 'absolute·-left-6·top-1/2·z-30·flex·size-8·-translate-y-1/2·cursor-pointer·items-center·justify-center·rounded-full·bg-primary-500·opacity-75·hover:bg-primary-600·sm:-left-8·lg:-left-10'

(prettier/prettier)


[error] 63-63: Unexpected usage of doublequote.

(jsx-quotes)


[error] 66-66: Replace "text-white" with 'text-white'

(prettier/prettier)


[error] 66-66: Unexpected usage of doublequote.

(jsx-quotes)


[error] 69-69: Replace "relative·flex·w-full·flex-col·items-center·justify-center·gap-4·px-4·xs:w-11/12·sm:w-4/5·md:w-5/6·lg:w-3/4" with 'relative·flex·w-full·flex-col·items-center·justify-center·gap-4·px-4·xs:w-11/12·sm:w-4/5·md:w-5/6·lg:w-3/4'

(prettier/prettier)


[error] 69-69: Unexpected usage of doublequote.

(jsx-quotes)


[error] 70-70: Replace "relative·flex·min-h-72·w-full·justify-center·overflow-hidden·sm:min-h-56·lg:h-80·lg:min-h-64·lg:w-[42rem]" with 'relative·flex·min-h-72·w-full·justify-center·overflow-hidden·sm:min-h-56·lg:h-80·lg:min-h-64·lg:w-[42rem]'

(prettier/prettier)


[error] 70-70: Unexpected usage of doublequote.

(jsx-quotes)


[error] 93-93: Replace "m-auto·flex·justify-center" with 'm-auto·flex·justify-center'

(prettier/prettier)


[error] 93-93: Unexpected usage of doublequote.

(jsx-quotes)


[error] 107-107: Replace "absolute·-right-6·top-1/2·z-30·flex·size-8·-translate-y-1/2·cursor-pointer·items-center·justify-center·rounded-full·bg-primary-500·opacity-75·hover:bg-primary-600·sm:-right-8·lg:-right-10" with 'absolute·-right-6·top-1/2·z-30·flex·size-8·-translate-y-1/2·cursor-pointer·items-center·justify-center·rounded-full·bg-primary-500·opacity-75·hover:bg-primary-600·sm:-right-8·lg:-right-10'

(prettier/prettier)


[error] 107-107: Unexpected usage of doublequote.

(jsx-quotes)


[error] 110-110: Replace "text-white" with 'text-white'

(prettier/prettier)


[error] 110-110: Unexpected usage of doublequote.

(jsx-quotes)


[error] 116-116: Newline required at end of file but not found.

(eol-last)


[error] 116-116: Insert

(prettier/prettier)

🪛 GitHub Actions: PR testing - if Node project
components/campaigns/AnnouncementHero.tsx

[error] 24-34: Replace ⏎····()·=>·banners.filter((banner)·=>·shouldShowBanner(banner.cfpDeadline)),⏎····[]⏎·· with ()·=>·banners.filter((banner)·=>·shouldShowBanner(banner.cfpDeadline)),·[] prettier/prettier


[error] 42-42: Expected to return a value at the end of arrow function. consistent-return


[error] 59-59: Replace "section"·padding=""·className="text-center" with 'section'·padding=''·className='text-center' prettier/prettier


[error] 59-59: Unexpected usage of doublequote. jsx-quotes


[error] 63-63: Unexpected usage of doublequote. jsx-quotes


[error] 66-66: Replace "text-white" with 'text-white' prettier/prettier


[error] 69-69: Replace "relative·flex·w-full·flex-col·items-center·justify-center·gap-4·px-4·xs:w-11/12·sm:w-4/5·md:w-5/6·lg:w-3/4" with 'relative·flex·w-full·flex-col·items-center·justify-center·gap-4·px-4·xs:w-11/12·sm:w-4/5·md:w-5/6·lg:w-3/4' prettier/prettier


[error] 70-70: Replace "relative·flex·min-h-72·w-full·justify-center·overflow-hidden·sm:min-h-56·lg:h-80·lg:min-h-64·lg:w-[42rem]" with 'relative·flex·min-h-72·w-full·justify-center·overflow-hidden·sm:min-h-56·lg:h-80·lg:min-h-64·lg:w-[42rem]' prettier/prettier


[error] 93-93: Replace "m-auto·flex·justify-center" with 'm-auto·flex·justify-center' prettier/prettier


[error] 107-107: Replace "absolute·-right-6·top-1/2·z-30·flex·size-8·-translate-y-1/2·cursor-pointer·items-center·justify-center·rounded-full·bg-primary-500·opacity-75·hover:bg-primary-600·sm:-right-8·lg:-right-10" with 'absolute·-right-6·top-1/2·z-30·flex·size-8·-translate-y-1/2·cursor-pointer·items-center·justify-center·rounded-full·bg-primary-500·opacity-75·hover:bg-primary-600·sm:-right-8·lg:-right-10' prettier/prettier


[error] 110-110: Replace "text-white" with 'text-white' prettier/prettier


[error] 116-116: Newline required at end of file but not found. eol-last

🔇 Additional comments (10)
package.json (1)

150-150: Proper version pinning for eslint dependency.

Updating from a general major version (^8) to a specific minor version (^8.57.1) is a good practice. This provides better dependency stability while still allowing patch updates.

styles/globals.css (9)

1-1: Good CSS cleanup and documentation.

Adding descriptive comments about the removed unused imports improves code maintainability.


14-15: Proper Tailwind cleanup.

Removing the redundant @tailwind variants directive is appropriate since it's not required in Tailwind CSS v3+. This helps keep the CSS clean and up-to-date with modern Tailwind practices.


24-26: Improved selector formatting.

The spacing around the > combinator improves code readability while maintaining the same functionality.


54-58: Simplified keyframe animation.

The background position changes in the keyframe animation maintain the same visual effect while using a more consistent format.


71-78: Enhanced documentation and organization.

Improving the comment text from "adjust swiper library" to "Adjusted Swiper library styles" makes the purpose clearer and maintains a consistent comment style.


107-110: Improved selector formatting.

The added spacing for the :focus and :hover pseudo-classes improves readability while maintaining functionality.


127-132: Better media query organization.

Consistent formatting in the media query section enhances readability and maintainability.


161-162: Proper documentation of removed code.

The comment about removed redundant orbit animations helps future developers understand what was removed and why, which is a good documentation practice.


164-165: Improved cursor styling.

Ensuring the cursor property is properly set for interactive elements like select boxes improves the user experience.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

♻️ Duplicate comments (6)
components/campaigns/AnnouncementHero.tsx (6)

27-27: ⚠️ Potential issue

Missing dependency in useMemo may cause stale data issues.

The empty dependency array means visibleBanners will only be computed once when the component mounts and won't react to changes in the banners array. This could lead to outdated banner display if banners changes during the component's lifecycle.

Add banners to the dependency array:

-  const visibleBanners = useMemo(() => banners.filter((banner) => shouldShowBanner(banner.cfpDeadline)), []);
+  const visibleBanners = useMemo(() => banners.filter((banner) => shouldShowBanner(banner.cfpDeadline)), [banners]);

121-121: ⚠️ Potential issue

Missing newline at end of file.

Add a newline at the end of the file to fix the linting error.

Apply this diff:

}
+
🧰 Tools
🪛 ESLint

[error] 121-121: Newline required at end of file but not found.

(eol-last)


[error] 121-121: Insert

(prettier/prettier)

🪛 GitHub Actions: PR testing - if Node project

[error] 121-121: Newline required at end of file but not found. eol-last


38-40: ⚠️ Potential issue

Fix trailing comma and add parentheses in goToNext function.

Similar to the previous function, this needs parentheses around the conditional expression and the trailing comma should be removed.

Apply this diff:

  setActiveIndex((prevIndex) =>
-    prevIndex === numberOfVisibleBanners - 1 ? 0 : prevIndex + 1,
+    (prevIndex === numberOfVisibleBanners - 1 ? 0 : prevIndex + 1)
  );
🧰 Tools
🪛 ESLint

[error] 38-40: Replace ⏎······prevIndex·===·numberOfVisibleBanners·-·1·?·0·:·prevIndex·+·1,⏎···· with ·(prevIndex·===·numberOfVisibleBanners·-·1·?·0·:·prevIndex·+·1)

(prettier/prettier)


[error] 39-39: Unexpected trailing comma.

(comma-dangle)

🪛 GitHub Actions: PR testing - if Node project

[error] 38-38: Replace ⏎······prevIndex·===·numberOfVisibleBanners·-·1·?·0·:·prevIndex·+·1,⏎···· with ·(prevIndex·===·numberOfVisibleBanners·-·1·?·0·:·prevIndex·+·1) prettier/prettier


[error] 39-39: Unexpected trailing comma. comma-dangle


21-24: ⚠️ Potential issue

Fix formatting and trailing comma in props declaration.

The component's props declaration contains a trailing comma after small = false, which is causing a linting error. The formatting should also be adjusted according to the project's style guidelines.

Apply this diff to fix the formatting:

export default function AnnouncementHero({
  className = '',
-  small = false,
+  small = false
}: IAnnouncementHeroProps) {
🧰 Tools
🪛 ESLint

[error] 21-24: Replace ⏎··className·=·'',⏎··small·=·false,⏎ with ·className·=·'',·small·=·false·

(prettier/prettier)


[error] 23-23: Unexpected trailing comma.

(comma-dangle)

🪛 GitHub Actions: PR testing - if Node project

[error] 21-21: Replace ⏎··className·=·'',⏎··small·=·false,⏎ with ·className·=·'',·small·=·false· prettier/prettier


[error] 23-23: Unexpected trailing comma. comma-dangle


47-57: 🛠️ Refactor suggestion

Improved banner cycling with proper cleanup and explicit return.

The conditional check for multiple banners is a good optimization, but the function is missing an explicit return for the else case, causing a linting error.

Apply this diff:

useEffect(() => {
  if (numberOfVisibleBanners > 1) {
    const interval = setInterval(() => {
      setActiveIndex((index) => (index + 1) % numberOfVisibleBanners);
    }, 10000);

    return () => {
      clearInterval(interval);
    };
  }
+  return undefined; // Explicit return to satisfy the linter
}, [numberOfVisibleBanners]);
🧰 Tools
🪛 ESLint

[error] 47-47: Expected to return a value at the end of arrow function.

(consistent-return)

🪛 GitHub Actions: PR testing - if Node project

[error] 47-47: Expected to return a value at the end of arrow function. consistent-return


98-99: ⚠️ Potential issue

Fix quotes in navigation indicators container.

The indicators container has the same quote consistency issue.

Apply this diff:

-        <div className="m-auto flex justify-center">
+        <div className='m-auto flex justify-center'>
🧰 Tools
🪛 ESLint

[error] 98-98: Replace "m-auto·flex·justify-center" with 'm-auto·flex·justify-center'

(prettier/prettier)


[error] 98-98: Unexpected usage of doublequote.

(jsx-quotes)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ff7b467 and 0f5cd54.

📒 Files selected for processing (3)
  • components/campaigns/AnnouncementHero.tsx (3 hunks)
  • package.json (1 hunks)
  • styles/globals.css (9 hunks)
✅ Files skipped from review due to trivial changes (1)
  • package.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • styles/globals.css
🧰 Additional context used
🧬 Code Graph Analysis (1)
components/campaigns/AnnouncementHero.tsx (2)
components/campaigns/banners.ts (2)
  • banners (18-82)
  • shouldShowBanner (6-16)
components/icons/ArrowLeft.tsx (1)
  • ArrowLeft (7-17)
🪛 ESLint
components/campaigns/AnnouncementHero.tsx

[error] 21-24: Replace ⏎··className·=·'',⏎··small·=·false,⏎ with ·className·=·'',·small·=·false·

(prettier/prettier)


[error] 23-23: Unexpected trailing comma.

(comma-dangle)


[error] 32-34: Replace ⏎······prevIndex·===·0·?·numberOfVisibleBanners·-·1·:·prevIndex·-·1,⏎···· with ·(prevIndex·===·0·?·numberOfVisibleBanners·-·1·:·prevIndex·-·1)

(prettier/prettier)


[error] 33-33: Unexpected trailing comma.

(comma-dangle)


[error] 38-40: Replace ⏎······prevIndex·===·numberOfVisibleBanners·-·1·?·0·:·prevIndex·+·1,⏎···· with ·(prevIndex·===·numberOfVisibleBanners·-·1·?·0·:·prevIndex·+·1)

(prettier/prettier)


[error] 39-39: Unexpected trailing comma.

(comma-dangle)


[error] 47-47: Expected to return a value at the end of arrow function.

(consistent-return)


[error] 64-64: Replace "section"·padding=""·className="text-center" with 'section'·padding=''·className='text-center'

(prettier/prettier)


[error] 64-64: Unexpected usage of doublequote.

(jsx-quotes)


[error] 64-64: Unexpected usage of doublequote.

(jsx-quotes)


[error] 64-64: Unexpected usage of doublequote.

(jsx-quotes)


[error] 65-65: Replace "relative·flex·flex-row·items-center·justify-center·gap-2·overflow-visible·sm:gap-4" with 'relative·flex·flex-row·items-center·justify-center·gap-2·overflow-visible·sm:gap-4'

(prettier/prettier)


[error] 65-65: Unexpected usage of doublequote.

(jsx-quotes)


[error] 68-68: Replace "absolute·-left-6·top-1/2·z-30·flex·size-8·-translate-y-1/2·cursor-pointer·items-center·justify-center·rounded-full·bg-primary-500·opacity-75·hover:bg-primary-600·sm:-left-8·lg:-left-10" with 'absolute·-left-6·top-1/2·z-30·flex·size-8·-translate-y-1/2·cursor-pointer·items-center·justify-center·rounded-full·bg-primary-500·opacity-75·hover:bg-primary-600·sm:-left-8·lg:-left-10'

(prettier/prettier)


[error] 68-68: Unexpected usage of doublequote.

(jsx-quotes)


[error] 71-71: Replace "text-white" with 'text-white'

(prettier/prettier)


[error] 71-71: Unexpected usage of doublequote.

(jsx-quotes)


[error] 74-74: Replace "relative·flex·w-full·flex-col·items-center·justify-center·gap-4·px-4·xs:w-11/12·sm:w-4/5·md:w-5/6·lg:w-3/4" with 'relative·flex·w-full·flex-col·items-center·justify-center·gap-4·px-4·xs:w-11/12·sm:w-4/5·md:w-5/6·lg:w-3/4'

(prettier/prettier)


[error] 74-74: Unexpected usage of doublequote.

(jsx-quotes)


[error] 75-75: Replace "relative·flex·min-h-72·w-full·justify-center·overflow-hidden·sm:min-h-56·lg:h-80·lg:min-h-64·lg:w-[42rem]" with 'relative·flex·min-h-72·w-full·justify-center·overflow-hidden·sm:min-h-56·lg:h-80·lg:min-h-64·lg:w-[42rem]'

(prettier/prettier)


[error] 75-75: Unexpected usage of doublequote.

(jsx-quotes)


[error] 98-98: Replace "m-auto·flex·justify-center" with 'm-auto·flex·justify-center'

(prettier/prettier)


[error] 98-98: Unexpected usage of doublequote.

(jsx-quotes)


[error] 112-112: Replace "absolute·-right-6·top-1/2·z-30·flex·size-8·-translate-y-1/2·cursor-pointer·items-center·justify-center·rounded-full·bg-primary-500·opacity-75·hover:bg-primary-600·sm:-right-8·lg:-right-10" with 'absolute·-right-6·top-1/2·z-30·flex·size-8·-translate-y-1/2·cursor-pointer·items-center·justify-center·rounded-full·bg-primary-500·opacity-75·hover:bg-primary-600·sm:-right-8·lg:-right-10'

(prettier/prettier)


[error] 112-112: Unexpected usage of doublequote.

(jsx-quotes)


[error] 115-115: Replace "text-white" with 'text-white'

(prettier/prettier)


[error] 115-115: Unexpected usage of doublequote.

(jsx-quotes)


[error] 121-121: Newline required at end of file but not found.

(eol-last)


[error] 121-121: Insert

(prettier/prettier)

🪛 GitHub Actions: PR testing - if Node project
components/campaigns/AnnouncementHero.tsx

[error] 21-21: Replace ⏎··className·=·'',⏎··small·=·false,⏎ with ·className·=·'',·small·=·false· prettier/prettier


[error] 23-23: Unexpected trailing comma. comma-dangle


[error] 32-32: Replace ⏎······prevIndex·===·0·?·numberOfVisibleBanners·-·1·:·prevIndex·-·1,⏎···· with ·(prevIndex·===·0·?·numberOfVisibleBanners·-·1·:·prevIndex·-·1) prettier/prettier


[error] 33-33: Unexpected trailing comma. comma-dangle


[error] 38-38: Replace ⏎······prevIndex·===·numberOfVisibleBanners·-·1·?·0·:·prevIndex·+·1,⏎···· with ·(prevIndex·===·numberOfVisibleBanners·-·1·?·0·:·prevIndex·+·1) prettier/prettier


[error] 39-39: Unexpected trailing comma. comma-dangle


[error] 47-47: Expected to return a value at the end of arrow function. consistent-return


[error] 64-64: Replace "section"·padding=""·className="text-center" with 'section'·padding=''·className='text-center' prettier/prettier


[error] 64-64: Unexpected usage of doublequote. jsx-quotes


[error] 68-68: Replace "absolute·-left-6·top-1/2·z-30·flex·size-8·-translate-y-1/2·cursor-pointer·items-center·justify-center·rounded-full·bg-primary-500·opacity-75·hover:bg-primary-600·sm:-left-8·lg:-left-10" with 'absolute·-left-6·top-1/2·z-30·flex·size-8·-translate-y-1/2·cursor-pointer·items-center·justify-center·rounded-full·bg-primary-500·opacity-75·hover:bg-primary-600·sm:-left-8·lg:-left-10' prettier/prettier


[error] 71-71: Replace "text-white" with 'text-white' prettier/prettier


[error] 121-121: Newline required at end of file but not found. eol-last

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (5)
components/campaigns/AnnouncementHero.tsx (5)

113-113: ⚠️ Potential issue

Add newline at end of file

There's a linting error because the file is missing a newline at the end.

}
+
🧰 Tools
🪛 ESLint

[error] 113-113: Newline required at end of file but not found.

(eol-last)


[error] 113-113: Insert

(prettier/prettier)

🪛 GitHub Actions: PR testing - if Node project

[error] 113-113: Error: Newline required at end of file but not found. eol-last


39-48: 🛠️ Refactor suggestion

Improved performance optimization with conditional interval

The addition of the condition to only set up the interval when there are multiple banners is an excellent optimization. However, there's a linting error related to inconsistent return patterns.

Add an explicit return statement for the case when no interval is set:

  useEffect(() => {
    if (numberOfVisibleBanners > 1) {
      const interval = setInterval(() => {
        setActiveIndex((index) => (index + 1) % numberOfVisibleBanners);
      }, 10000);

      return () => {
        clearInterval(interval);
      };
    }
+   return undefined; // Explicit return to satisfy the linter
  }, [numberOfVisibleBanners]);
🧰 Tools
🪛 ESLint

[error] 39-39: Expected to return a value at the end of arrow function.

(consistent-return)

🪛 GitHub Actions: PR testing - if Node project

[error] 39-39: Error: Expected to return a value at the end of arrow function. consistent-return


60-63: ⚠️ Potential issue

Fix quote usage in left navigation button

The left navigation button has improved positioning with Tailwind's built-in negative margin classes, but the quotes need to be fixed.

-            className={"absolute -left-6 top-1/2 z-30 flex size-8 -translate-y-1/2 cursor-pointer items-center justify-center rounded-full bg-primary-500 opacity-75 hover:bg-primary-600 sm:-left-8 lg:-left-10"}
+            className={'absolute -left-6 top-1/2 z-30 flex size-8 -translate-y-1/2 cursor-pointer items-center justify-center rounded-full bg-primary-500 opacity-75 hover:bg-primary-600 sm:-left-8 lg:-left-10'}
          onClick={goToPrevious}
        >
-            <ArrowLeft className="text-white" />
+            <ArrowLeft className='text-white' />
🧰 Tools
🪛 ESLint

[error] 60-60: Replace "absolute·-left-6·top-1/2·z-30·flex·size-8·-translate-y-1/2·cursor-pointer·items-center·justify-center·rounded-full·bg-primary-500·opacity-75·hover:bg-primary-600·sm:-left-8·lg:-left-10" with ⏎··············'absolute·-left-6·top-1/2·z-30·flex·size-8·-translate-y-1/2·cursor-pointer·items-center·justify-center·rounded-full·bg-primary-500·opacity-75·hover:bg-primary-600·sm:-left-8·lg:-left-10'⏎············

(prettier/prettier)


[error] 60-60: Strings must use singlequote.

(quotes)


[error] 63-63: Replace "text-white" with 'text-white'

(prettier/prettier)


[error] 63-63: Unexpected usage of doublequote.

(jsx-quotes)

🪛 GitHub Actions: PR testing - if Node project

[error] 60-60: Error: Strings must use singlequote. quotes


[error] 63-63: Error: Replace "text-white" with 'text-white' prettier/prettier


66-67: ⚠️ Potential issue

Fix quote usage in banner container

The responsive container classes for controlling banner width and height across different screen sizes are well-structured, but the quotes need to be consistent with project standards.

-        <div className="relative flex w-full flex-col items-center justify-center gap-4 px-4 xs:w-11/12 sm:w-4/5 md:w-5/6 lg:w-3/4">
-          <div className="relative flex min-h-72 w-full justify-center overflow-hidden sm:min-h-56 lg:h-80 lg:min-h-64 lg:w-[42rem]">
+        <div className='relative flex w-full flex-col items-center justify-center gap-4 px-4 xs:w-11/12 sm:w-4/5 md:w-5/6 lg:w-3/4'>
+          <div className='relative flex min-h-72 w-full justify-center overflow-hidden sm:min-h-56 lg:h-80 lg:min-h-64 lg:w-[42rem]'>
🧰 Tools
🪛 ESLint

[error] 66-66: Replace "relative·flex·w-full·flex-col·items-center·justify-center·gap-4·px-4·xs:w-11/12·sm:w-4/5·md:w-5/6·lg:w-3/4" with 'relative·flex·w-full·flex-col·items-center·justify-center·gap-4·px-4·xs:w-11/12·sm:w-4/5·md:w-5/6·lg:w-3/4'

(prettier/prettier)


[error] 66-66: Unexpected usage of doublequote.

(jsx-quotes)


[error] 67-67: Replace "relative·flex·min-h-72·w-full·justify-center·overflow-hidden·sm:min-h-56·lg:h-80·lg:min-h-64·lg:w-[42rem]" with 'relative·flex·min-h-72·w-full·justify-center·overflow-hidden·sm:min-h-56·lg:h-80·lg:min-h-64·lg:w-[42rem]'

(prettier/prettier)


[error] 67-67: Unexpected usage of doublequote.

(jsx-quotes)

🪛 GitHub Actions: PR testing - if Node project

[error] 66-66: Error: Replace "relative·flex·w-full·flex-col·items-center·justify-center·gap-4·px-4·xs:w-11/12·sm:w-4/5·md:w-5/6·lg:w-3/4" with 'relative·flex·w-full·flex-col·items-center·justify-center·gap-4·px-4·xs:w-11/12·sm:w-4/5·md:w-5/6·lg:w-3/4' prettier/prettier


[error] 67-67: Error: Replace "relative·flex·min-h-72·w-full·justify-center·overflow-hidden·sm:min-h-56·lg:h-80·lg:min-h-64·lg:w-[42rem]" with 'relative·flex·min-h-72·w-full·justify-center·overflow-hidden·sm:min-h-56·lg:h-80·lg:min-h-64·lg:w-[42rem]' prettier/prettier


104-107: ⚠️ Potential issue

Fix quote usage in right navigation button

Similar to the left navigation button, the right navigation button has improved positioning but needs quote fixing.

-            className={"absolute -right-6 top-1/2 z-30 flex size-8 -translate-y-1/2 cursor-pointer items-center justify-center rounded-full bg-primary-500 opacity-75 hover:bg-primary-600 sm:-right-8 lg:-right-10"}
+            className={'absolute -right-6 top-1/2 z-30 flex size-8 -translate-y-1/2 cursor-pointer items-center justify-center rounded-full bg-primary-500 opacity-75 hover:bg-primary-600 sm:-right-8 lg:-right-10'}
          onClick={goToNext}
        >
-            <ArrowRight className="text-white" />
+            <ArrowRight className='text-white' />
🧰 Tools
🪛 ESLint

[error] 104-104: Replace "absolute·-right-6·top-1/2·z-30·flex·size-8·-translate-y-1/2·cursor-pointer·items-center·justify-center·rounded-full·bg-primary-500·opacity-75·hover:bg-primary-600·sm:-right-8·lg:-right-10" with ⏎··············'absolute·-right-6·top-1/2·z-30·flex·size-8·-translate-y-1/2·cursor-pointer·items-center·justify-center·rounded-full·bg-primary-500·opacity-75·hover:bg-primary-600·sm:-right-8·lg:-right-10'⏎············

(prettier/prettier)


[error] 104-104: Strings must use singlequote.

(quotes)


[error] 107-107: Replace "text-white" with 'text-white'

(prettier/prettier)


[error] 107-107: Unexpected usage of doublequote.

(jsx-quotes)

🪛 GitHub Actions: PR testing - if Node project

[error] 104-104: Error: Strings must use singlequote. quotes


[error] 107-107: Error: Replace "text-white" with 'text-white' prettier/prettier

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0f5cd54 and 7ef9cbe.

📒 Files selected for processing (1)
  • components/campaigns/AnnouncementHero.tsx (3 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
components/campaigns/AnnouncementHero.tsx (1)
components/icons/ArrowLeft.tsx (1)
  • ArrowLeft (7-17)
🪛 ESLint
components/campaigns/AnnouncementHero.tsx

[error] 56-56: Replace "section"·padding=""·className="text-center" with 'section'·padding=''·className='text-center'

(prettier/prettier)


[error] 56-56: Unexpected usage of doublequote.

(jsx-quotes)


[error] 56-56: Unexpected usage of doublequote.

(jsx-quotes)


[error] 56-56: Unexpected usage of doublequote.

(jsx-quotes)


[error] 57-57: Replace "relative·flex·flex-row·items-center·justify-center·gap-2·overflow-visible·sm:gap-4" with 'relative·flex·flex-row·items-center·justify-center·gap-2·overflow-visible·sm:gap-4'

(prettier/prettier)


[error] 57-57: Unexpected usage of doublequote.

(jsx-quotes)


[error] 60-60: Replace "absolute·-left-6·top-1/2·z-30·flex·size-8·-translate-y-1/2·cursor-pointer·items-center·justify-center·rounded-full·bg-primary-500·opacity-75·hover:bg-primary-600·sm:-left-8·lg:-left-10" with ⏎··············'absolute·-left-6·top-1/2·z-30·flex·size-8·-translate-y-1/2·cursor-pointer·items-center·justify-center·rounded-full·bg-primary-500·opacity-75·hover:bg-primary-600·sm:-left-8·lg:-left-10'⏎············

(prettier/prettier)


[error] 60-60: Strings must use singlequote.

(quotes)


[error] 63-63: Replace "text-white" with 'text-white'

(prettier/prettier)


[error] 63-63: Unexpected usage of doublequote.

(jsx-quotes)


[error] 66-66: Replace "relative·flex·w-full·flex-col·items-center·justify-center·gap-4·px-4·xs:w-11/12·sm:w-4/5·md:w-5/6·lg:w-3/4" with 'relative·flex·w-full·flex-col·items-center·justify-center·gap-4·px-4·xs:w-11/12·sm:w-4/5·md:w-5/6·lg:w-3/4'

(prettier/prettier)


[error] 66-66: Unexpected usage of doublequote.

(jsx-quotes)


[error] 67-67: Replace "relative·flex·min-h-72·w-full·justify-center·overflow-hidden·sm:min-h-56·lg:h-80·lg:min-h-64·lg:w-[42rem]" with 'relative·flex·min-h-72·w-full·justify-center·overflow-hidden·sm:min-h-56·lg:h-80·lg:min-h-64·lg:w-[42rem]'

(prettier/prettier)


[error] 67-67: Unexpected usage of doublequote.

(jsx-quotes)


[error] 90-90: Replace "m-auto·flex·justify-center" with 'm-auto·flex·justify-center'

(prettier/prettier)


[error] 90-90: Unexpected usage of doublequote.

(jsx-quotes)


[error] 104-104: Replace "absolute·-right-6·top-1/2·z-30·flex·size-8·-translate-y-1/2·cursor-pointer·items-center·justify-center·rounded-full·bg-primary-500·opacity-75·hover:bg-primary-600·sm:-right-8·lg:-right-10" with ⏎··············'absolute·-right-6·top-1/2·z-30·flex·size-8·-translate-y-1/2·cursor-pointer·items-center·justify-center·rounded-full·bg-primary-500·opacity-75·hover:bg-primary-600·sm:-right-8·lg:-right-10'⏎············

(prettier/prettier)


[error] 104-104: Strings must use singlequote.

(quotes)


[error] 107-107: Replace "text-white" with 'text-white'

(prettier/prettier)


[error] 107-107: Unexpected usage of doublequote.

(jsx-quotes)


[error] 113-113: Newline required at end of file but not found.

(eol-last)


[error] 113-113: Insert

(prettier/prettier)

🪛 GitHub Actions: PR testing - if Node project
components/campaigns/AnnouncementHero.tsx

[error] 39-39: Error: Expected to return a value at the end of arrow function. consistent-return


[error] 56-56: Error: Replace "section·padding=''·className='text-center'" with 'section·padding=''·className='text-center' prettier/prettier


[error] 56-56: Error: Unexpected usage of doublequote. jsx-quotes


[error] 60-60: Error: Strings must use singlequote. quotes


[error] 63-63: Error: Replace "text-white" with 'text-white' prettier/prettier


[error] 66-66: Error: Replace "relative·flex·w-full·flex-col·items-center·justify-center·gap-4·px-4·xs:w-11/12·sm:w-4/5·md:w-5/6·lg:w-3/4" with 'relative·flex·w-full·flex-col·items-center·justify-center·gap-4·px-4·xs:w-11/12·sm:w-4/5·md:w-5/6·lg:w-3/4' prettier/prettier


[error] 67-67: Error: Replace "relative·flex·min-h-72·w-full·justify-center·overflow-hidden·sm:min-h-56·lg:h-80·lg:min-h-64·lg:w-[42rem]" with 'relative·flex·min-h-72·w-full·justify-center·overflow-hidden·sm:min-h-56·lg:h-80·lg:min-h-64·lg:w-[42rem]' prettier/prettier


[error] 90-90: Error: Replace "m-auto·flex·justify-center" with 'm-auto·flex·justify-center' prettier/prettier


[error] 104-104: Error: Strings must use singlequote. quotes


[error] 107-107: Error: Replace "text-white" with 'text-white' prettier/prettier


[error] 113-113: Error: Newline required at end of file but not found. eol-last

🔇 Additional comments (1)
components/campaigns/AnnouncementHero.tsx (1)

56-111: Great alignment improvements with overflow adjustments

The change from overflow-x-hidden to overflow-visible in the container makes the navigation buttons fully visible outside the container boundaries. The responsive sizing adjustments for different screen widths provide better control over the banner's display, and the z-index increase on navigation buttons ensures they're always on top.

🧰 Tools
🪛 ESLint

[error] 56-56: Replace "section"·padding=""·className="text-center" with 'section'·padding=''·className='text-center'

(prettier/prettier)


[error] 56-56: Unexpected usage of doublequote.

(jsx-quotes)


[error] 56-56: Unexpected usage of doublequote.

(jsx-quotes)


[error] 56-56: Unexpected usage of doublequote.

(jsx-quotes)


[error] 57-57: Replace "relative·flex·flex-row·items-center·justify-center·gap-2·overflow-visible·sm:gap-4" with 'relative·flex·flex-row·items-center·justify-center·gap-2·overflow-visible·sm:gap-4'

(prettier/prettier)


[error] 57-57: Unexpected usage of doublequote.

(jsx-quotes)


[error] 60-60: Replace "absolute·-left-6·top-1/2·z-30·flex·size-8·-translate-y-1/2·cursor-pointer·items-center·justify-center·rounded-full·bg-primary-500·opacity-75·hover:bg-primary-600·sm:-left-8·lg:-left-10" with ⏎··············'absolute·-left-6·top-1/2·z-30·flex·size-8·-translate-y-1/2·cursor-pointer·items-center·justify-center·rounded-full·bg-primary-500·opacity-75·hover:bg-primary-600·sm:-left-8·lg:-left-10'⏎············

(prettier/prettier)


[error] 60-60: Strings must use singlequote.

(quotes)


[error] 63-63: Replace "text-white" with 'text-white'

(prettier/prettier)


[error] 63-63: Unexpected usage of doublequote.

(jsx-quotes)


[error] 66-66: Replace "relative·flex·w-full·flex-col·items-center·justify-center·gap-4·px-4·xs:w-11/12·sm:w-4/5·md:w-5/6·lg:w-3/4" with 'relative·flex·w-full·flex-col·items-center·justify-center·gap-4·px-4·xs:w-11/12·sm:w-4/5·md:w-5/6·lg:w-3/4'

(prettier/prettier)


[error] 66-66: Unexpected usage of doublequote.

(jsx-quotes)


[error] 67-67: Replace "relative·flex·min-h-72·w-full·justify-center·overflow-hidden·sm:min-h-56·lg:h-80·lg:min-h-64·lg:w-[42rem]" with 'relative·flex·min-h-72·w-full·justify-center·overflow-hidden·sm:min-h-56·lg:h-80·lg:min-h-64·lg:w-[42rem]'

(prettier/prettier)


[error] 67-67: Unexpected usage of doublequote.

(jsx-quotes)


[error] 90-90: Replace "m-auto·flex·justify-center" with 'm-auto·flex·justify-center'

(prettier/prettier)


[error] 90-90: Unexpected usage of doublequote.

(jsx-quotes)


[error] 104-104: Replace "absolute·-right-6·top-1/2·z-30·flex·size-8·-translate-y-1/2·cursor-pointer·items-center·justify-center·rounded-full·bg-primary-500·opacity-75·hover:bg-primary-600·sm:-right-8·lg:-right-10" with ⏎··············'absolute·-right-6·top-1/2·z-30·flex·size-8·-translate-y-1/2·cursor-pointer·items-center·justify-center·rounded-full·bg-primary-500·opacity-75·hover:bg-primary-600·sm:-right-8·lg:-right-10'⏎············

(prettier/prettier)


[error] 104-104: Strings must use singlequote.

(quotes)


[error] 107-107: Replace "text-white" with 'text-white'

(prettier/prettier)


[error] 107-107: Unexpected usage of doublequote.

(jsx-quotes)

🪛 GitHub Actions: PR testing - if Node project

[error] 56-56: Error: Replace "section·padding=''·className='text-center'" with 'section·padding=''·className='text-center' prettier/prettier


[error] 56-56: Error: Unexpected usage of doublequote. jsx-quotes


[error] 60-60: Error: Strings must use singlequote. quotes


[error] 63-63: Error: Replace "text-white" with 'text-white' prettier/prettier


[error] 66-66: Error: Replace "relative·flex·w-full·flex-col·items-center·justify-center·gap-4·px-4·xs:w-11/12·sm:w-4/5·md:w-5/6·lg:w-3/4" with 'relative·flex·w-full·flex-col·items-center·justify-center·gap-4·px-4·xs:w-11/12·sm:w-4/5·md:w-5/6·lg:w-3/4' prettier/prettier


[error] 67-67: Error: Replace "relative·flex·min-h-72·w-full·justify-center·overflow-hidden·sm:min-h-56·lg:h-80·lg:min-h-64·lg:w-[42rem]" with 'relative·flex·min-h-72·w-full·justify-center·overflow-hidden·sm:min-h-56·lg:h-80·lg:min-h-64·lg:w-[42rem]' prettier/prettier


[error] 90-90: Error: Replace "m-auto·flex·justify-center" with 'm-auto·flex·justify-center' prettier/prettier


[error] 104-104: Error: Strings must use singlequote. quotes


[error] 107-107: Error: Replace "text-white" with 'text-white' prettier/prettier

Copy link

codecov bot commented Apr 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (6d5490c) to head (c4ca4b5).

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #4031   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           21        21           
  Lines          671       671           
  Branches       115       115           
=========================================
  Hits           671       671           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Pushkar780
Copy link
Author

Please review @sambhavgupta0705

Copy link
Collaborator

@TRohit20 TRohit20 left a comment

Choose a reason for hiding this comment

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

Looks fine to me, Can you PTAL? @vishvamsinh28

@Siddhant-Pragyan-Sinha
Copy link

Hey @vishvamsinh28 can you please review this PR and provide feedback regarding it

Copy link
Member

@akshatnema akshatnema left a comment

Choose a reason for hiding this comment

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

There is an uneven increase in the height & width of the poster. We don't need to change it for desktop view.

Before:
image

After:
image

@akshatnema
Copy link
Member

Hey @vishvamsinh28, Please review this PR thoroughly.

@vishvamsinh28
Copy link
Contributor

vishvamsinh28 commented Apr 25, 2025

Hey @Pushkar780 the poster is now visible on the Ambassador page, but there are a few issues that need to be fixed:

  1. You have increased the height and width of the poster, why? I think the current size is perfect we don't need to make it bigger.
  2. On mobile, the arrows have no margin on the left and right sides.
  3. Except for the landing page, the poster on all other pages have no top margin.
  4. Why is there so much empty space below the apply button?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Announcement banner not showing or misaligned on some pages
6 participants