-
Notifications
You must be signed in to change notification settings - Fork 6
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
refactor: simplify Banner
component structure
#50
Conversation
Quality Gate passedIssues Measures |
Deploying redot-website with Cloudflare Pages
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
Simplified the Banner component by removing motion animations and replacing them with CSS transitions, while adding a gradient background and hover effects.
- Removed
framer-motion
dependency and"use client"
directive from/components/Banner.tsx
- Added gradient background styling (
from-pink-500 via-amber-500 to-orange-500
) in/components/Banner.tsx
- Made
link
prop required and removed conditional rendering ofsubMessage
for simpler implementation - Implemented smooth hover animation using CSS
transition-transform
andgroup-hover:translate-x-1
classes
💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!
1 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile
readonly mainMessage?: string; | ||
readonly subMessage?: string; | ||
readonly link?: string; | ||
readonly link: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: mainMessage is marked optional but required in the implementation (line 15 returns null if !mainMessage). Consider making it required in the interface
</div> | ||
<Link href={link} target="_blank" rel="noopener noreferrer"> | ||
<div className="group flex select-none items-center justify-center gap-2 bg-gradient-to-r from-pink-500 via-amber-500 to-orange-500 py-2 font-sans text-sm font-medium tracking-tight text-white"> | ||
<p className="hidden md:block">{subMessage}</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: subMessage is rendered unconditionally now - could show empty space if undefined
PR Content:
Old
New