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
6569
package-lock.json
generated
6569
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -14,7 +14,7 @@
|
|||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"eslint-plugin-react": "^7.21.5",
|
||||
"next": "^9.2.2",
|
||||
"next": "^10.0.3",
|
||||
"react": "^16.13.0",
|
||||
"react-dom": "^16.13.0",
|
||||
"unfetch": "^4.1.0"
|
||||
|
|
|
@ -43,6 +43,7 @@ export default function Layout(props) {
|
|||
<div className="sidebarheader">Frylabs</div>
|
||||
</div>
|
||||
{sidebarOpen ? (
|
||||
<>
|
||||
<div id="sideBarLinks">
|
||||
{Object.keys(tabs).map((key) => {
|
||||
const item = tabs[key]
|
||||
|
@ -64,6 +65,8 @@ export default function Layout(props) {
|
|||
</a>
|
||||
</Link>
|
||||
</div>
|
||||
<div className="userInfo">User # TODO</div>
|
||||
</>
|
||||
) : null}
|
||||
</div>
|
||||
<div className="content">{props.children}</div>
|
||||
|
|
|
@ -12,7 +12,7 @@ export default function Sidebar(props) {
|
|||
onClose()
|
||||
}}
|
||||
>
|
||||
{'>'}
|
||||
{'⏩'}
|
||||
</div>
|
||||
<div className={styles.content}>{props.children}</div>
|
||||
</div>
|
||||
|
|
|
@ -12,12 +12,14 @@
|
|||
}
|
||||
|
||||
.closeBorder {
|
||||
padding: 5px;
|
||||
font-size: 14px;
|
||||
padding: 2px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
justify-content: center;
|
||||
color: white;
|
||||
background-color: #222;
|
||||
}
|
||||
|
||||
.closeBorder:hover {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"siteUrl": "https://qmining.frylabs.net/",
|
||||
"apiUrl": "http://localhost:8080/",
|
||||
"apiUrl": "https://api.frylabs.net/",
|
||||
"mobileWindowWidth": 700,
|
||||
"maxQuestionsToRender": 250
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"text": "Összes kérdés TXT"
|
||||
},
|
||||
"data": {
|
||||
"href": "/data.json",
|
||||
"href": "/TODOalldata",
|
||||
"text": "Összes kérdés JSON"
|
||||
},
|
||||
"irc": {
|
||||
|
|
|
@ -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