Skip to content

Commit a1701b5

Browse files
committed
refactor: adjust alignment
1 parent 089fd98 commit a1701b5

1 file changed

Lines changed: 23 additions & 22 deletions

File tree

app/(home)/components/Testimonials.tsx

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -139,23 +139,18 @@ export function Testimonials() {
139139

140140
</div>
141141

142+
{/* CAROUSEL */}
142143
<div
143-
className="relative"
144+
className="relative sm:-ms-[1%] -ms-[5%] px-[8%] lg:px-4"
144145
onClick={() => setIsInteracting(true)}
145146
onMouseLeave={() => setIsInteracting(false)}
146147
>
147-
<button
148-
className="z-20 absolute left-0 md:left-8 bottom-1/2 bg-opacity-0"
149-
onClick={() => api?.scrollTo(current - 1)}
150-
>
151-
<Image src={prevArrowIcon} alt="Prev" className="w-2/3" />
152-
</button>
153148
<CarouselContainer
154149
setApi={setApi}
155150
opts={{ loop: true }}
156151
autoplay={!isInteracting}
157152
autoplayInterval={5000}
158-
className="mx-auto px-[10%]"
153+
className="mx-auto"
159154
>
160155
<CarouselContent className="mx-auto py-20">
161156
{dummyData.map((data, index) => (
@@ -176,13 +171,19 @@ export function Testimonials() {
176171
</CarouselContent>
177172
<CarouselDots className="z-10 absolute bottom-4 left-1/2 -translate-x-1/2 text-2xl py-4 text" />
178173
</CarouselContainer>
179-
<button
180-
className="z-20 absolute -right-3 md:right-8 bottom-1/2 bg-opacity-0"
181-
onClick={() => api?.scrollTo(current + 1)}
182-
>
183-
<Image src={nextArrowIcon} alt="Next" className="w-2/3" />
184-
</button>
185174
</div>
175+
<button
176+
className="z-20 absolute sm:left-6 left-0 sm:top-1/2 bottom-1/3 bg-opacity-0"
177+
onClick={() => api?.scrollTo(current - 1)}
178+
>
179+
<Image src={prevArrowIcon} alt="Prev" className="w-2/3" />
180+
</button>
181+
<button
182+
className="z-20 absolute sm:right-6 right-0 sm:top-1/2 bottom-1/3 bg-opacity-0"
183+
onClick={() => api?.scrollTo(current + 1)}
184+
>
185+
<Image src={nextArrowIcon} alt="Next" className="w-2/3" />
186+
</button>
186187
</Container>
187188
</section>
188189
);
@@ -235,14 +236,14 @@ const TestimonialCard = ({
235236
<div className="absolute h-1/2 inset-y-1/4 px-[5%] text-white text-xs sm:text-base lg:text-base xl:text-lg overflow-hidden text-ellipsis xl:leading-6">
236237
{comment}
237238
</div>
238-
<a
239-
href="/404"
240-
target="_blank"
241-
className="absolute h-fit pt-[15%] px-[4%] inset-x-1 bottom-[24%] text-[#B3B3B3] underline underline-offset-2 decoration-1 text-xs sm:text-base bg-gradient-to-t from-medium-dark-green from-50% -mt-3"
242-
>
243-
{' '}
244-
Read More
245-
</a>
239+
<div className="absolute h-fit pt-[15%] px-[4%] inset-x-1 bottom-[24%] text-[#B3B3B3] underline underline-offset-2 decoration-1 text-xs sm:text-base bg-gradient-to-t from-medium-dark-green from-50% -mt-3">
240+
<a
241+
href="/404"
242+
target="_blank"
243+
>
244+
Read More
245+
</a>
246+
</div>
246247
</div>
247248

248249
{/* USER AVATAR & NAME */}

0 commit comments

Comments
 (0)