hardcoded page url
This commit is contained in:
1 parent
7599e9d41f
commit
962780aeb1
6 files changed
+6
-6
No files matched your search
@@ -27,7 +27,7 @@ const Page = (props) => (
|
||||
)
|
||||
|
||||
Page.getInitialProps = async (ctx) => {
|
||||
const pageUrl = ctx.req.url
|
||||
const pageUrl = '/gallery'
|
||||
const id = ctx.query.album
|
||||
const apiUrl = `http://localhost:3000/api/albums/${id}`
|
||||
const res = await axios.get(apiUrl)
|
||||
|
||||
@@ -28,7 +28,7 @@ const Page = (props) => (
|
||||
)
|
||||
|
||||
Page.getInitialProps = async (ctx) => {
|
||||
const pageUrl = ctx.req.url
|
||||
const pageUrl = '/'
|
||||
const id = ctx.query.article
|
||||
const apiUrl = `http://localhost:3000/api/articles/${id}`
|
||||
const res = await axios.get(apiUrl)
|
||||
|
||||
@@ -32,7 +32,7 @@ const Page = (props) => (
|
||||
)
|
||||
|
||||
Page.getInitialProps = async (ctx) => {
|
||||
const pageUrl = ctx.req.url
|
||||
const pageUrl = '/'
|
||||
const page = parseInt(ctx.query.page)
|
||||
const pageSize = 10
|
||||
const apiUrl = `http://localhost:3000/api/articles?page=${page}&pageSize=${pageSize}`
|
||||
|
||||
@@ -20,7 +20,7 @@ const Page = (props) => (
|
||||
)
|
||||
|
||||
Page.getInitialProps = async (ctx) => {
|
||||
const pageUrl = ctx.req.url
|
||||
const pageUrl = '/documents'
|
||||
const id = ctx.query.document
|
||||
const apiUrl = `http://localhost:3000/api/files/${id}`
|
||||
const res = await axios.get(apiUrl)
|
||||
|
||||
+1
-1
@@ -119,7 +119,7 @@ const Page = (props) => (
|
||||
)
|
||||
|
||||
Page.getInitialProps = async (ctx) => {
|
||||
const pageUrl = ctx.req.url
|
||||
const pageUrl = '/documents'
|
||||
const apiUrl = `http://localhost:3000/api/files`
|
||||
const res = await axios.get(apiUrl)
|
||||
const files = res.data.items
|
||||
|
||||
@@ -20,7 +20,7 @@ const Index = (props) => (
|
||||
)
|
||||
|
||||
Index.getInitialProps = async (ctx) => {
|
||||
const pageUrl = ctx.req.url
|
||||
const pageUrl = '/collective'
|
||||
const id = ctx.query.person
|
||||
const apiUrl = `http://localhost:3000/api/persons/${id}`
|
||||
const res = await axios.get(apiUrl)
|
||||
|
||||
Reference in new issue
Block a user