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

Function handleResize

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

Source from the content-addressed store, hash-verified

73 const [intervalId, setIntervalId] = useState(null);
74 useEffect(() => {
75 const handleResize = () => {
76 const screenWidth = window.innerWidth;
77 if (screenWidth <= 700) {
78 setNumVisible(1);
79 } else if (screenWidth >= 700 && screenWidth < 1024) {
80 setNumVisible(2);
81 } else if (screenWidth >= 1024 && screenWidth < 1300) {
82 setNumVisible(2);
83 } else {
84 setNumVisible(3);
85 }
86 };
87
88 const startAutoCarousel = () => {
89 const id = setInterval(() => {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected