mirror of
https://github.com/usebruno/bruno.git
synced 2025-08-15 19:28:11 +02:00
feat: navbar component
This commit is contained in:
4
packages/grafnode-run/.babelrc
Normal file
4
packages/grafnode-run/.babelrc
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"presets": ["next/babel"],
|
||||
"plugins": [["styled-components", { "ssr": true }]]
|
||||
}
|
2970
packages/grafnode-run/package-lock.json
generated
2970
packages/grafnode-run/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@grafnode/www",
|
||||
"name": "@grafnode/run",
|
||||
"version": "0.0.1",
|
||||
"description": "",
|
||||
"main": "src/index.js",
|
||||
@ -32,6 +32,8 @@
|
||||
"tailwindcss": "^2.2.19"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-plugin-styled-components": "^2.0.2",
|
||||
"babel-preset-next": "^1.4.0",
|
||||
"eslint": "7.32.0",
|
||||
"eslint-config-next": "12.0.4"
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import '../styles/globals.css'
|
||||
import 'tailwindcss/dist/tailwind.min.css';
|
||||
|
||||
function MyApp({ Component, pageProps }) {
|
||||
return <Component {...pageProps} />
|
||||
|
44
packages/grafnode-run/src/pages/_document.js
Normal file
44
packages/grafnode-run/src/pages/_document.js
Normal file
@ -0,0 +1,44 @@
|
||||
import Document, { Html, Head, Main, NextScript } from 'next/document';
|
||||
import { ServerStyleSheet } from 'styled-components';
|
||||
|
||||
export default class MyDocument extends Document {
|
||||
static async getInitialProps(ctx) {
|
||||
const sheet = new ServerStyleSheet();
|
||||
const originalRenderPage = ctx.renderPage;
|
||||
|
||||
try {
|
||||
ctx.renderPage = () =>
|
||||
originalRenderPage({
|
||||
enhanceApp: (App) => (props) =>
|
||||
sheet.collectStyles(<App {...props} />),
|
||||
})
|
||||
|
||||
const initialProps = await Document.getInitialProps(ctx)
|
||||
return {
|
||||
...initialProps,
|
||||
styles: (
|
||||
<>
|
||||
{initialProps.styles}
|
||||
{sheet.getStyleElement()}
|
||||
</>
|
||||
),
|
||||
};
|
||||
} finally {
|
||||
sheet.seal();
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Html>
|
||||
<Head>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet"/>
|
||||
</Head>
|
||||
<body>
|
||||
<Main />
|
||||
<NextScript />
|
||||
</body>
|
||||
</Html>
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user