2017-07-11 18:17:00 +00:00
|
|
|
import React from 'react'
|
|
|
|
import PropTypes from 'prop-types'
|
|
|
|
import Link from 'next/link'
|
|
|
|
import { compose, setDisplayName, pure, setPropTypes } from 'recompose'
|
|
|
|
import Clock from './clock'
|
|
|
|
import AddCount from './addCount'
|
|
|
|
|
2018-12-17 16:34:32 +00:00
|
|
|
const Page = ({ title, linkTo, light, lastUpdate, count, addCount }) => (
|
2017-07-11 18:17:00 +00:00
|
|
|
<div>
|
|
|
|
<h1>{title}</h1>
|
|
|
|
<Clock lastUpdate={lastUpdate} light={light} />
|
|
|
|
<AddCount count={count} addCount={addCount} />
|
|
|
|
<nav>
|
2018-12-17 16:34:32 +00:00
|
|
|
<Link href={linkTo}>
|
|
|
|
<a>Navigate</a>
|
|
|
|
</Link>
|
2017-07-11 18:17:00 +00:00
|
|
|
</nav>
|
|
|
|
</div>
|
2018-12-17 16:34:32 +00:00
|
|
|
)
|
2017-07-11 18:17:00 +00:00
|
|
|
|
|
|
|
export default compose(
|
|
|
|
setDisplayName('Page'),
|
|
|
|
setPropTypes({
|
|
|
|
title: PropTypes.string,
|
|
|
|
linkTo: PropTypes.string,
|
|
|
|
light: PropTypes.bool,
|
|
|
|
lastUpdate: PropTypes.number,
|
|
|
|
count: PropTypes.number,
|
|
|
|
addCount: PropTypes.func
|
|
|
|
}),
|
|
|
|
pure
|
|
|
|
)(Page)
|