Revert "Make the carousel swing!"

This reverts commit e2afdc242e69c97bc85861b999166094246ab830.
This commit is contained in:
Sam Poder 2024-03-28 13:26:48 -04:00 committed by Max Wofford
parent 7277be6a82
commit 246b2de0a2

View file

@ -21,7 +21,7 @@ import Footer from '../components/footer'
import { keyframes } from '@emotion/react'
import { thousands } from '../lib/members'
import StaticMention from '../components/mention'
import { useEffect, useState, useRef } from 'react'
import { useEffect, useState } from 'react'
const ShipBadge = props => (
<Badge
@ -47,17 +47,17 @@ const waves = keyframes({
const ShipPage = ({ projects = [] }) => {
const projectIndexRef = useRef(0);
const [project, setProject] = useState(projects[projectIndexRef.current]);
const [projectIndex, setProjectIndex] = useState(0)
useEffect(() => {
const intervalId = setInterval(() => {
const nextProjectIndex = (projectIndexRef.current + 1) % 2;
projectIndexRef.current = nextProjectIndex;
setProject(projects[projectIndexRef.current])
}, 2 * 1000); // rapidly change while developing to see new things
return () => clearInterval(intervalId);
}, []);
const nextProjectIndex = (projectIndex + 1) % 2
setProjectIndex(nextProjectIndex)
}, 2 * 1000) // rapidly change while developing to see new things
return () => clearInterval(intervalId)
}, [])
const project = projects[projectIndex]
return (
<>