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

fixes: Fix Button Text Overflow on Product Cards #2377 #2378

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ export default function App() {
<Route path="about-us" element={<AboutUs />} />
<Route path="help" element={<Help />} /> {/* Help page route */}
<Route path="privacy-policy" element={<Privacy />} />

<Route path="help" element={<Help />} />
<Route path="privacy" element={<Privacy />} />
{/* Privacy policy page route */}
<Route path="cart" element={<Cart />} />
<Route
Expand Down
4 changes: 2 additions & 2 deletions src/User/components/Popular_Categories/ProductGrid.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function ProductCard({ product }) {
{/* Add to cart button */}
<div className="flex h-10 gap-2">
<button
className="mt-1 bg-[#166635ff] text-white px-4 py-2 rounded text-sm w-full hover:bg-[#3d9970ff] transition-colors disabled:opacity-45 disabled:pointer-events-none"
className="mt-1 bg-[#166635ff] text-white px-8 py-1 rounded-lg text-xs w-full hover:bg-[#3d9970ff] transition-colors disabled:opacity-45 disabled:pointer-events-none"
onClick={() => {
onAddToCart(product);
}}
Expand All @@ -129,7 +129,7 @@ function ProductCard({ product }) {
onAddToCart(product); // First, add the product to the cart
handleBuyNow(); // Then, navigate to the payment page
}}
className="mt-1 bg-orange-600 text-white px-4 py-2 rounded text-sm w-full hover:bg-orange-700 transition-colors disabled:opacity-45 disabled:pointer-events-none"
className="mt-1 bg-[#166635ff] text-white px-8 py-1 rounded-lg text-xs w-full hover:bg-[#3d9970ff] transition-colors disabled:opacity-45 disabled:pointer-events-none"
disabled={cartItems.find((item) => item.id === product.id)}>
{cartItems.find((item) => item.id === product.id)
? "⚡Buy Now"
Expand Down