v3.1: Upgraded to NextJS 12

Static Dockerfile

Signed-off-by: Avior <github@avior.me>
This commit is contained in:
2022-10-02 22:10:54 +02:00
parent 4561aab6dd
commit b2ca46ffaf
23 changed files with 3446 additions and 18991 deletions

View File

@ -1,3 +0,0 @@
// Put your program constants here
export const TEST = true

10
src/components/README.md Normal file
View File

@ -0,0 +1,10 @@
# Components used through the app
folder architecture:
```
components
|-- componentName
|-- index.tsx
|-- componentName.styl
```

4
src/globals.styl Normal file
View File

@ -0,0 +1,4 @@
// Here is your global Stylus styling affecting the whole page
html, body
background white

View File

1
src/libs/README.md Normal file
View File

@ -0,0 +1 @@
# Libs used through the app (frontend/backend libs)

1
src/models/README.md Normal file
View File

@ -0,0 +1 @@
the different models you app uses

View File

@ -1,22 +1,12 @@
import React from 'react'
import App from 'next/app'
import Router from 'next/router'
import { DefaultSeo } from 'next-seo'
import { NotificationManager, Navbar, Loader, Footer } from '@dzeio/components'
// import '../styl/globals.styl'
// import '../globals.styl'
import '@dzeio/components/style.css'
export default class CustomApp extends App<unknown, unknown, {path?: string}> {
public componentDidMount(): void {
this.checkMessage()
this.setState({ path: Router.asPath })
Router.events.on('routeChangeComplete', () => {
this.checkMessage()
this.setState({ path: Router.asPath })
})
}
export default class CustomApp extends App {
public render(): JSX.Element {
const { Component, pageProps } = this.props
@ -28,10 +18,7 @@ export default class CustomApp extends App<unknown, unknown, {path?: string}> {
title="Sitemap"
description="Site description"
/>
<Navbar
type="navbar"
items={[]}
/>
<Navbar menu={[{name: 'Hello'}, {name: 'World'}]} />
<Loader auto={{ increment: [1, 10], interval: [5, 50] }} />
<Component {...pageProps} />
<NotificationManager manageRoutes />
@ -39,12 +26,4 @@ export default class CustomApp extends App<unknown, unknown, {path?: string}> {
</>
)
}
private checkMessage() {
const msg = Router.query.message
if (typeof msg === 'string') {
NotificationManager.addNotification(msg)
}
}
}

View File

@ -0,0 +1,2 @@
.test
background: orange !important

View File

@ -1,10 +1,12 @@
import React from 'react'
import { Text } from '@dzeio/components'
import css from './index.module.styl'
export default class Homepage extends React.Component {
public render = (): JSX.Element => (
<main>
<main className={css.test}>
<Text>Hello World !</Text>
</main>
)

View File

@ -1,3 +0,0 @@
// Global styl here
html, body
background white

View File

@ -1,4 +0,0 @@
declare module '*.styl' {
const content: any
export = content
}