mirror of
https://gitlab.com/MrFry/qmining-page
synced 2025-04-01 20:23:44 +02:00
Sidebar links changes, getstaticprops tries
This commit is contained in:
parent
a13fee6f84
commit
c6ba225fd8
8 changed files with 2193 additions and 4508 deletions
|
@ -1,5 +1,6 @@
|
|||
// import App from 'next/app'
|
||||
|
||||
import React from 'react'
|
||||
import '../defaultStyles.css'
|
||||
import Layout from '../components/layout'
|
||||
import constants from '../constants.json'
|
||||
|
@ -57,6 +58,7 @@ function fetchData() {
|
|||
}
|
||||
|
||||
function MyApp({ Component, pageProps, router }) {
|
||||
console.log(pageProps)
|
||||
return (
|
||||
<Layout route={router.route}>
|
||||
<Component {...pageProps} router={router} getData={fetchData} />
|
||||
|
@ -64,6 +66,21 @@ function MyApp({ Component, pageProps, router }) {
|
|||
)
|
||||
}
|
||||
|
||||
export async function getStaticProps() {
|
||||
console.log('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
|
||||
const res = await fetch('https://stuff.frylabs.net/asd.json', {
|
||||
credentials: 'include',
|
||||
})
|
||||
const resp = await res.json()
|
||||
console.log('aaaaaaaaaaaaa', resp)
|
||||
return {
|
||||
props: {
|
||||
msg: 'aaaaa',
|
||||
fetched: resp,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// Only uncomment this method if you have blocking data requirements for
|
||||
// every single page in your application. This disables the ability to
|
||||
// perform automatic static optimization, causing every page in your app to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue