feat: add Render to sponsor rewards and implement 3D flip card effect#23
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR updates the Sponsor Rewards UI by adding a new sponsor (Render) and enhancing the rewards cards with a 3D flip interaction to show “front” vs “details” content.
Changes:
- Add “Render” to the sponsor rewards list (logo, value, and description).
- Replace the static reward card with a 3D flip-card UI (front face + back face).
- Adjust grid layout and styling to accommodate an additional card and the flip interaction.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -1,4 +1,4 @@ | |||
| import React from 'react'; | |||
| import React, { useState } from 'react'; | |||
Comment on lines
+12
to
+16
| const [flippedCards, setFlippedCards] = useState<Record<number, boolean>>({}); | ||
|
|
||
| const toggleFlip = (index: number) => { | ||
| setFlippedCards(prev => ({ ...prev, [index]: !prev[index] })); | ||
| }; |
Comment on lines
496
to
+499
| const variant = entranceVariants[index] || entranceVariants[1]; | ||
| const isMobileView = typeof window !== 'undefined' && window.innerWidth < 768; | ||
| const initialState = isMobileView ? variant.mobileInitial : variant.initial; | ||
| const isFlipped = flippedCards[index] || false; |
| const isFlipped = flippedCards[index] || false; | ||
|
|
||
| return ( | ||
| <motion.div |
Comment on lines
+514
to
+517
| <div | ||
| className={`flip-card ${isFlipped ? 'flipped' : ''}`} | ||
| onClick={() => toggleFlip(index)} | ||
| > |
Comment on lines
+556
to
+558
| <span className="flip-hint"> | ||
| <span className="flip-hint-icon">↻</span> Tap to flip | ||
| </span> |
Comment on lines
+211
to
+219
| .flip-hint-icon { | ||
| display: inline-block; | ||
| animation: flipHintPulse 2s ease-in-out infinite; | ||
| } | ||
|
|
||
| @keyframes flipHintPulse { | ||
| 0%, 100% { transform: rotateY(0deg); } | ||
| 50% { transform: rotateY(180deg); } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.