diff --git a/frontend/src/components/Pages/About.jsx b/frontend/src/components/Pages/About.jsx index 244d9bf5..794229f3 100644 --- a/frontend/src/components/Pages/About.jsx +++ b/frontend/src/components/Pages/About.jsx @@ -1,33 +1,48 @@ -import bgpic from "../../assets/img/abt1.jpg" +import bgpic from "../../assets/img/abt1.jpg"; export default function About() { return ( -
+
-
{/* Black overlay with 40% opacity */} -
-

ABOUT US

-
-

{/* Change text color for better contrast */} + {/* Black overlay with 40% opacity */} +

+ + {/* Content container */} +
+ {/* Heading */} +

+ ABOUT US +

+ + {/* Paragraph */} +
+

How it works.. Our name says it all! Founder, Jonathan Li, shares a passion for board games, boba, and delicious food, so he combined them all to become Sip & Play, Park Slope’s first board game cafe. It is a straightforward concept, come in with your - friends and family to play any board game from our library of 300+ games! + friends and family to play any board game from our library of{" "} + 300+ games! We hope when you visit, you also enjoy our coffee, espresso, boba, sandwiches, and snacks!

- Hours and Location - New opening hours:
- Sunday: 10am-11pm
- Mon-Thurs: 11am-11pm
- Fri: 11am-midnight
- Sat: 10am-midnight
+ Hours and Location +
+ New opening hours: +
+ Sunday: 10am-11pm +
+ Mon-Thurs: 11am-11pm +
+ Fri: 11am-midnight +
+ Sat: 10am-midnight +
Our kitchen closes 2.5-3 hours before we close!

diff --git a/frontend/src/components/ui/ReviewCarousel.jsx b/frontend/src/components/ui/ReviewCarousel.jsx index 12d1b238..38094e46 100644 --- a/frontend/src/components/ui/ReviewCarousel.jsx +++ b/frontend/src/components/ui/ReviewCarousel.jsx @@ -1,12 +1,11 @@ -import { useState } from "react"; +import { useState,useEffect } from "react"; import { MdStars, MdArrowBackIos, MdArrowForwardIos } from "react-icons/md"; const ReviewCarousel = () => { const reviews = [ { name: "Jane Smith", - review: - "Great games and coffee. The perfect spot to unwind with friends!", + review: "Great games and coffee. The perfect spot to unwind with friends!", img: "https://randomuser.me/api/portraits/men/51.jpg", rating: 5, }, @@ -42,21 +41,28 @@ const ReviewCarousel = () => { }, { name: "Olivia Green", - review: - "Great atmosphere and an excellent selection of board games. Will be back!", + review: "Great atmosphere and an excellent selection of board games. Will be back!", img: "https://randomuser.me/api/portraits/women/72.jpg", rating: 4, }, { name: "Ethan White", - review: - "The vibe is amazing, and the staff is super friendly. Highly recommend!", + review: "The vibe is amazing, and the staff is super friendly. Highly recommend!", img: "https://randomuser.me/api/portraits/men/33.jpg", rating: 5, }, ]; const [currentIndex, setCurrentIndex] = useState(0); + const [showMoreStates, setShowMoreStates] = useState( + reviews.map(() => false) + ); + + const toggleShowMore = (index) => { + const updatedStates = [...showMoreStates]; + updatedStates[index] = !updatedStates[index]; + setShowMoreStates(updatedStates); + }; const nextSlide = () => { setCurrentIndex((prevIndex) => @@ -69,37 +75,55 @@ const ReviewCarousel = () => { prevIndex === 0 ? reviews.length - 4 : prevIndex - 1 ); }; + const [cardsToShow, setCardsToShow] = useState(1); + + const updateCardsToShow = () => { + if (window.innerWidth >= 768) { + setCardsToShow(4); + } else { + setCardsToShow(1); + } + }; + + useEffect(() => { + updateCardsToShow(); + window.addEventListener("resize", updateCardsToShow); + + return () => { + window.removeEventListener("resize", updateCardsToShow); + }; + }, []); return (
-
+

Customer Feedback

-
-
+
+
{reviews.map((review, index) => (
-
-
+
+
-

{review.name}

+

{review.name}

{Array(review.rating) .fill() @@ -108,25 +132,35 @@ const ReviewCarousel = () => { ))}
-

- {review.review} + +

+ {showMoreStates[index] + ? review.review + : `${review.review.substring(0, 50)}...`} + toggleShowMore(index)} + > + {showMoreStates[index] ? " Show less" : " Read more"} +

))}
+ {reviews.length > 4 && ( <>