Fixed issue with story pager in Tech and Disability
This commit is contained in:
parent
71fd840606
commit
87ad2bd12b
1 changed files with 3 additions and 3 deletions
|
|
@ -9,9 +9,9 @@ import Head from 'next/head'
|
||||||
|
|
||||||
export async function getServerSideProps(context) {
|
export async function getServerSideProps(context) {
|
||||||
if(context.query.page == null || context.query.page == '0') {
|
if(context.query.page == null || context.query.page == '0') {
|
||||||
var page = 0;
|
var page = 1;
|
||||||
} else {
|
} else {
|
||||||
var page = Number(context.query.page) - 1
|
var page = Number(context.query.page)
|
||||||
}
|
}
|
||||||
|
|
||||||
const { serverRuntimeConfig, publicRuntimeConfig } = getConfig()
|
const { serverRuntimeConfig, publicRuntimeConfig } = getConfig()
|
||||||
|
|
@ -20,7 +20,7 @@ export async function getServerSideProps(context) {
|
||||||
|
|
||||||
const rssFeed = config.siteURL+"/feed/"+project.data[0].attributes.Slug+"-feed.xml"
|
const rssFeed = config.siteURL+"/feed/"+project.data[0].attributes.Slug+"-feed.xml"
|
||||||
|
|
||||||
const articles = await getAllPosts([project.data[0].attributes.Slug], page, 5)
|
const articles = await getAllPosts(project.data[0].attributes.Slug, page, 5)
|
||||||
|
|
||||||
const secres = await fetch(serverRuntimeConfig.base_path + `/api/sections`)
|
const secres = await fetch(serverRuntimeConfig.base_path + `/api/sections`)
|
||||||
const secdata = await secres.json()
|
const secdata = await secres.json()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue