MCPcopy Create free account
hub / github.com/devs-in-tech/DevsInTech / goToPrev

Function goToPrev

src/components/testimonial.js:105–113  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

103 const visibleTestimonials = testimonials.slice(current, current + numVisible);
104
105 const goToPrev = () => {
106 setCurrent((prev) => {
107 if (prev === 0) {
108 return testimonials.length - numVisible;
109 } else {
110 return prev - 1;
111 }
112 });
113 };
114
115 const goToNext = () => {
116 setCurrent((prev) => {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected