mess with cache etc

This commit is contained in:
keyan 2021-10-25 14:49:46 -05:00
parent 2b4e283c84
commit 06b0424b82
2 changed files with 6 additions and 2 deletions

View File

@ -2,6 +2,9 @@ const { withPlausibleProxy } = require('next-plausible')
module.exports = withPlausibleProxy()({
compress: false,
experimental: {
scrollRestoration: true
},
generateBuildId: process.env.NODE_ENV === 'development'
? undefined
: async () => {

View File

@ -7,11 +7,12 @@ import { Nav, Navbar } from 'react-bootstrap'
import styles from '../../components/header.module.css'
import Link from 'next/link'
export async function getServerSideProps ({ req }) {
export async function getServerSideProps ({ req, params: { within } }) {
const client = await getSSRApolloClient(req)
console.log('called')
const { data } = await client.query({
query: MORE_ITEMS,
variables: { sort: 'top', within: req.query?.within?.pop() }
variables: { sort: 'top', within: within?.pop() }
})
let items, cursor