Skip to content

Conversation

rohansen856
Copy link
Collaborator

This pull request introduces a new "Sponsors" section to the homepage, visually highlighting both sponsors and food partners with animated logos and a thank-you message. The main changes involve importing and integrating the new Sponsors component into the homepage, and implementing the component itself with styled layouts and floating animations.

Homepage integration:

  • Added the Sponsors component import to src/app/page.tsx, and inserted a new section for sponsors between the prizes and contact sections. [1] [2]

New Sponsors section implementation:

  • Created src/components/Sponsors.tsx with:
    • A list of sponsors and food partners, each with a name, type, and logo.
    • Distinct display areas for sponsors and food partners, each showing logos with floating animations and styled cards.
    • Responsive design and custom CSS for floating effects, including keyframe animations and mobile adjustments.
    • A thank-you message to acknowledge sponsor support.

Signed-off-by: rohansen856 <rohansen856@gmail.com>
@rohansen856 rohansen856 requested a review from Copilot September 16, 2025 20:00
Copy link

vercel bot commented Sep 16, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
code-rumble2-0 Ready Ready Preview Comment Sep 16, 2025 8:00pm

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new sponsors section to the homepage that showcases sponsors and food partners with animated floating logos and a thank-you message.

Key changes:

  • Added a new Sponsors component with floating animations for sponsor logos
  • Integrated the sponsors section into the homepage between prizes and contact sections

Reviewed Changes

Copilot reviewed 2 out of 6 changed files in this pull request and generated 4 comments.

File Description
src/components/Sponsors.tsx New component with sponsor/partner data, floating animations, and responsive design
src/app/page.tsx Added import and section for the new Sponsors component

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

className="mx-4 h-[200px] md:h-[300px] lg:h-[400px] w-full relative"
>
<div
key={sponsor.name}
Copy link
Preview

Copilot AI Sep 16, 2025

Choose a reason for hiding this comment

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

Duplicate key prop detected. The key prop is already defined on line 56 for the parent div element. Remove the duplicate key from line 60.

Suggested change
key={sponsor.name}

Copilot uses AI. Check for mistakes.

Comment on lines +65 to +66
left: index === 0 ? "50%" : index === 1 ? "50%" : "80%",
top: index === 0 ? "50%" : index === 1 ? "75%" : "40%",
Copy link
Preview

Copilot AI Sep 16, 2025

Choose a reason for hiding this comment

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

[nitpick] The hardcoded positioning logic with nested ternary operators is difficult to maintain. Consider using a position mapping object or array to make the positioning more readable and maintainable.

Copilot uses AI. Check for mistakes.

Comment on lines +97 to +111
{sponsors
.filter((sponsor) => sponsor.type === "Food Partner")
.map((sponsor, index) => (
<div
key={sponsor.name}
className={`absolute floating-sponsor floating-sponsor-${
index + 2
}`}
style={{
left: index === 0 ? "20%" : index === 1 ? "50%" : "80%",
top: index === 0 ? "45%" : index === 1 ? "75%" : "40%",
transform: "translate(-50%, -50%)",
animationDelay: `${(index + 1) * 0.5}s`,
}}
>
Copy link
Preview

Copilot AI Sep 16, 2025

Choose a reason for hiding this comment

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

[nitpick] Duplicate positioning logic from the sponsors section. This hardcoded positioning with nested ternary operators should be extracted into a shared utility function or configuration object to reduce code duplication.

Suggested change
{sponsors
.filter((sponsor) => sponsor.type === "Food Partner")
.map((sponsor, index) => (
<div
key={sponsor.name}
className={`absolute floating-sponsor floating-sponsor-${
index + 2
}`}
style={{
left: index === 0 ? "20%" : index === 1 ? "50%" : "80%",
top: index === 0 ? "45%" : index === 1 ? "75%" : "40%",
transform: "translate(-50%, -50%)",
animationDelay: `${(index + 1) * 0.5}s`,
}}
>
{/*
Extracted positioning for Food Partners.
If more partners are added, extend this array accordingly.
*/}
{(() => {
const foodPartnerPositions = [
{ left: "20%", top: "45%" },
{ left: "50%", top: "75%" },
{ left: "80%", top: "40%" },
];
return sponsors
.filter((sponsor) => sponsor.type === "Food Partner")
.map((sponsor, index) => {
const pos = foodPartnerPositions[index] || { left: "50%", top: "50%" };
return (
<div
key={sponsor.name}
className={`absolute floating-sponsor floating-sponsor-${index + 2}`}
style={{
left: pos.left,
top: pos.top,
transform: "translate(-50%, -50%)",
animationDelay: `${(index + 1) * 0.5}s`,
}}
>

Copilot uses AI. Check for mistakes.

Comment on lines +141 to +207
<style jsx>{`
@keyframes float {
0%,
100% {
transform: translate(-50%, -50%) translateY(0px);
}
50% {
transform: translate(-50%, -50%) translateY(-20px);
}
}

@keyframes floatReverse {
0%,
100% {
transform: translate(-50%, -50%) translateY(0px);
}
50% {
transform: translate(-50%, -50%) translateY(20px);
}
}

@keyframes floatSlow {
0%,
100% {
transform: translate(-50%, -50%) translateY(0px) rotate(0deg);
}
50% {
transform: translate(-50%, -50%) translateY(-15px) rotate(5deg);
}
}

.floating-sponsor {
animation-duration: 3s;
animation-iteration-count: infinite;
animation-timing-function: ease-in-out;
}

.floating-sponsor-1 {
animation-name: float;
}

.floating-sponsor-2 {
animation-name: floatReverse;
animation-duration: 4s;
}

.floating-sponsor-3 {
animation-name: floatSlow;
animation-duration: 5s;
}

.floating-sponsor-4 {
animation-name: float;
animation-duration: 3.5s;
}

@media (max-width: 768px) {
.floating-sponsor {
position: relative !important;
left: auto !important;
top: auto !important;
transform: none !important;
margin: 1rem auto;
display: block;
}
}
`}</style>
Copy link
Preview

Copilot AI Sep 16, 2025

Choose a reason for hiding this comment

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

[nitpick] Using inline styles with styled-jsx in a Next.js component is not the recommended approach. Consider moving these styles to a CSS module, global CSS file, or using Tailwind CSS classes for better maintainability and performance.

Suggested change
<style jsx>{`
@keyframes float {
0%,
100% {
transform: translate(-50%, -50%) translateY(0px);
}
50% {
transform: translate(-50%, -50%) translateY(-20px);
}
}
@keyframes floatReverse {
0%,
100% {
transform: translate(-50%, -50%) translateY(0px);
}
50% {
transform: translate(-50%, -50%) translateY(20px);
}
}
@keyframes floatSlow {
0%,
100% {
transform: translate(-50%, -50%) translateY(0px) rotate(0deg);
}
50% {
transform: translate(-50%, -50%) translateY(-15px) rotate(5deg);
}
}
.floating-sponsor {
animation-duration: 3s;
animation-iteration-count: infinite;
animation-timing-function: ease-in-out;
}
.floating-sponsor-1 {
animation-name: float;
}
.floating-sponsor-2 {
animation-name: floatReverse;
animation-duration: 4s;
}
.floating-sponsor-3 {
animation-name: floatSlow;
animation-duration: 5s;
}
.floating-sponsor-4 {
animation-name: float;
animation-duration: 3.5s;
}
@media (max-width: 768px) {
.floating-sponsor {
position: relative !important;
left: auto !important;
top: auto !important;
transform: none !important;
margin: 1rem auto;
display: block;
}
}
`}</style>

Copilot uses AI. Check for mistakes.

@Vaibhavsahu2810 Vaibhavsahu2810 merged commit 75ccbe6 into main Sep 17, 2025
2 checks passed
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.

2 participants