Setup inital NextUI base
This commit is contained in:
parent
738d476962
commit
7018f1757f
2335
package-lock.json
generated
2335
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -10,6 +10,7 @@
|
||||
"dependencies": {
|
||||
"@emotion/cache": "^11.7.1",
|
||||
"@emotion/server": "^11.4.0",
|
||||
"@nextui-org/react": "^1.0.0-beta.10",
|
||||
"next": "12.0.10",
|
||||
"prop-types": "^15.8.1",
|
||||
"react": "17.0.2",
|
||||
|
@ -1,11 +1,16 @@
|
||||
// 1. import `NextUIProvider` component
|
||||
import { NextUIProvider } from '@nextui-org/react';
|
||||
import Head from 'next/head'
|
||||
|
||||
import Config from '../config.json';
|
||||
|
||||
import '../styles/globals.css'
|
||||
|
||||
|
||||
function MyApp({ Component, pageProps }) {
|
||||
return <>
|
||||
return (
|
||||
// 2. Use at the root of your app
|
||||
<NextUIProvider>
|
||||
<Head>
|
||||
<title>{Config.name}</title>
|
||||
<meta name="twitter:title" content= {Config.name} />
|
||||
@ -15,7 +20,8 @@ function MyApp({ Component, pageProps }) {
|
||||
<meta name="theme-color" content= {Config.color} />
|
||||
</Head>
|
||||
<Component {...pageProps} />
|
||||
</>
|
||||
</NextUIProvider>
|
||||
);
|
||||
}
|
||||
|
||||
export default MyApp
|
||||
export default MyApp;
|
||||
|
33
pages/_document.js
Normal file
33
pages/_document.js
Normal file
@ -0,0 +1,33 @@
|
||||
import React from 'react';
|
||||
import Document, { Html, Head, Main, NextScript } from 'next/document';
|
||||
import { CssBaseline } from '@nextui-org/react';
|
||||
|
||||
class MyDocument extends Document {
|
||||
static async getInitialProps(ctx) {
|
||||
const initialProps = await Document.getInitialProps(ctx);
|
||||
return {
|
||||
...initialProps,
|
||||
styles: React.Children.toArray([initialProps.styles])
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Html lang="en">
|
||||
<Head>
|
||||
{CssBaseline.flush()}
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Roboto:wght@300&display=swap"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
</Head>
|
||||
<body>
|
||||
<Main />
|
||||
<NextScript />
|
||||
</body>
|
||||
</Html>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default MyDocument;
|
@ -1,5 +1,3 @@
|
||||
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300&display=swap');
|
||||
|
||||
* {
|
||||
font-family: 'Roboto', sans-serif;
|
||||
color: white;
|
||||
|
Reference in New Issue
Block a user