stacker.news/pages/notifications.js
keyan 18910fa2ed Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades"
This reverts commit d0314ab73c42ebf85fe2f418dddd681af45dbc55.
2023-07-23 09:16:12 -05:00

21 lines
671 B
JavaScript

import { getGetServerSideProps } from '../api/ssrApollo'
import Layout from '../components/layout'
import Notifications from '../components/notifications'
import { NOTIFICATIONS } from '../fragments/notifications'
import { useRouter } from 'next/router'
export const getServerSideProps = getGetServerSideProps(NOTIFICATIONS)
export default function NotificationPage ({ data: { notifications: { notifications, cursor, lastChecked } } }) {
const router = useRouter()
return (
<Layout>
<Notifications
notifications={notifications} cursor={cursor}
lastChecked={lastChecked} variables={{ inc: router.query?.inc }}
/>
</Layout>
)
}