2020-05-25 18:55:33 +02:00
|
|
|
import { useEffect } from 'react'
|
|
|
|
import { useDispatch } from 'react-redux'
|
2020-04-15 01:36:50 +02:00
|
|
|
import Link from 'next/link'
|
2020-05-31 18:53:01 +02:00
|
|
|
import { startClock } from '../actions'
|
2019-03-14 17:40:00 +01:00
|
|
|
import Examples from '../components/examples'
|
|
|
|
|
2020-05-25 18:55:33 +02:00
|
|
|
const Index = () => {
|
|
|
|
const dispatch = useDispatch()
|
|
|
|
useEffect(() => {
|
|
|
|
dispatch(startClock())
|
|
|
|
}, [dispatch])
|
2019-03-14 17:40:00 +01:00
|
|
|
|
2020-05-25 18:55:33 +02:00
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<Examples />
|
|
|
|
<Link href="/show-redux-state">
|
|
|
|
<a>Click to see current Redux State</a>
|
|
|
|
</Link>
|
|
|
|
</>
|
|
|
|
)
|
|
|
|
}
|
2019-03-14 17:40:00 +01:00
|
|
|
|
2020-05-25 18:55:33 +02:00
|
|
|
export default Index
|