stacker.news/pages/~/[sub]/post.js

16 lines
455 B
JavaScript
Raw Normal View History

2022-02-17 17:23:43 +00:00
import { getGetServerSideProps } from '../../../api/ssrApollo'
import { SUB } from '../../../fragments/subs'
import LayoutCenter from '../../../components/layout-center'
2023-05-11 00:26:07 +00:00
import Post from '../../../components/post'
2022-02-17 17:23:43 +00:00
export const getServerSideProps = getGetServerSideProps(SUB, null,
data => !data.sub)
2022-02-17 17:23:43 +00:00
2023-05-11 00:26:07 +00:00
export default function PostPage ({ data: { sub } }) {
2022-02-17 17:23:43 +00:00
return (
<LayoutCenter sub={sub.name}>
2023-05-11 00:26:07 +00:00
<Post sub={sub} />
2022-02-17 17:23:43 +00:00
</LayoutCenter>
)
}