import { useEffect } from 'react'
import { useDispatch } from 'react-redux'
import { startClock, serverRenderClock, initializeStore } from '../store'
import Examples from '../components/examples'

const Index = () => {
  const dispatch = useDispatch()
  useEffect(() => {
    setInterval(() => dispatch(startClock(), 1000))
  }, [dispatch])

  return <Examples />
}

export async function getStaticProps() {
  const store = initializeStore()
  store.dispatch(serverRenderClock())

  return {
    props: {},
  }
}

export default Index

@@ -312,16 +312,16 @@
 ck()
+)
 , 1000)
-)
 %0A  %7D

Fix call to setInterval (#22357)