Skip to content

Commit

Permalink
chore(examples): updated nextjs examples to latest version of next
Browse files Browse the repository at this point in the history
  • Loading branch information
mlaursen committed Sep 8, 2021
1 parent ca9ecbd commit b50d745
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 12 deletions.
3 changes: 3 additions & 0 deletions examples/nextjs-typescript/.eslintrc.json
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
4 changes: 3 additions & 1 deletion examples/nextjs-typescript/package.json
Expand Up @@ -8,14 +8,16 @@
"start": "next start"
},
"dependencies": {
"next": "11.1.0",
"next": "11.1.2",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-md": "latest"
},
"devDependencies": {
"@types/node": "^16.6.1",
"@types/react": "^17.0.17",
"eslint": "7.32.0",
"eslint-config-next": "11.1.2",
"sass": "^1.37.5",
"typescript": "^4.3.5"
}
Expand Down
5 changes: 0 additions & 5 deletions examples/nextjs-typescript/src/pages/_app.tsx
Expand Up @@ -10,11 +10,6 @@ export default function App({ Component, pageProps }: AppProps): ReactElement {
return (
<Layout>
<Head>
<link
key="Roboto"
rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Roboto:400,500,700&display=swap"
/>
<title>react-md with next.js</title>
</Head>
<Component {...pageProps} />
Expand Down
21 changes: 21 additions & 0 deletions examples/nextjs-typescript/src/pages/_document.tsx
@@ -0,0 +1,21 @@
import React from "react";
import Document, { Html, Head, Main, NextScript } from "next/document";

export default class MyDocument extends Document {
render() {
return (
<Html>
<Head>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap"
/>
</Head>
<body>
<Main />
<NextScript />
</body>
</Html>
);
}
}
3 changes: 3 additions & 0 deletions examples/nextjs/.eslintrc.json
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
4 changes: 3 additions & 1 deletion examples/nextjs/package.json
Expand Up @@ -8,12 +8,14 @@
"start": "next start"
},
"dependencies": {
"next": "11.1.0",
"next": "11.1.2",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-md": "latest"
},
"devDependencies": {
"eslint": "7.32.0",
"eslint-config-next": "11.1.2",
"sass": "^1.37.5"
}
}
5 changes: 0 additions & 5 deletions examples/nextjs/src/pages/_app.jsx
Expand Up @@ -9,11 +9,6 @@ export default function App({ Component, pageProps }) {
return (
<Layout>
<Head>
<link
key="Roboto"
rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Roboto:400,500,700&display=swap"
/>
<title>react-md with next.js</title>
</Head>
<Component {...pageProps} />
Expand Down
21 changes: 21 additions & 0 deletions examples/nextjs/src/pages/_document.jsx
@@ -0,0 +1,21 @@
import React from 'react';
import Document, { Html, Head, Main, NextScript } from 'next/document';

export default class MyDocument extends Document {
render() {
return (
<Html>
<Head>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap"
/>
</Head>
<body>
<Main />
<NextScript />
</body>
</Html>
);
}
}

0 comments on commit b50d745

Please sign in to comment.