Skip to content

Commit

Permalink
Use arrow icon
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonappah committed Sep 4, 2023
1 parent 3380d72 commit 6c71c40
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
4 changes: 4 additions & 0 deletions public/testimonials/arrow-button.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 9 additions & 4 deletions src/components/Testimonials.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Image from "next/image";
import ArrowButton from "@/../public/testimonials/arrow-button.svg";
import Amrit from "@/../public/testimonials/amrit.png";
import JC from "@/../public/testimonials/jc.png";
import Kevin from "@/../public/testimonials/kevin.png";
Expand Down Expand Up @@ -42,10 +43,14 @@ const Testimonials = () => (
{t.name}, {t.classification}
</h3>

<span className="flex gap-2 mt-auto mb-8 md:mb-0 md:mt-0 place-self-end md:absolute md:bottom-0">
<a href={`#testimonial-${Math.max(0, idx-1)}`}>prev</a>
<p>{idx+1}/{arr.length}</p>
<a href={`#testimonial-${Math.min(arr.length-1, idx+1)}`}>next</a>
<span className="flex gap-3 mt-auto mb-8 md:mb-0 md:mt-0 place-self-end md:absolute md:bottom-0 items-center">
<a href={`#testimonial-${Math.max(0, idx-1)}`}>
<Image src={ArrowButton} alt="arrow" />
</a>
<p className="h-min">{idx+1}/{arr.length}</p>
<a href={`#testimonial-${Math.min(arr.length-1, idx+1)}`}>
<Image src={ArrowButton} alt="arrow" className="rotate-180" />
</a>
</span>
</span>
</div>
Expand Down

0 comments on commit 6c71c40

Please sign in to comment.