Add next-auth
This commit is contained in:
13
src/pages/_app.js
Normal file
13
src/pages/_app.js
Normal file
@ -0,0 +1,13 @@
|
||||
import "../styles/globals.css";
|
||||
|
||||
import { NextUIProvider } from "@nextui-org/react";
|
||||
|
||||
function MyApp({ Component, pageProps }) {
|
||||
return (
|
||||
<NextUIProvider>
|
||||
<Component {...pageProps} />
|
||||
</NextUIProvider>
|
||||
);
|
||||
}
|
||||
|
||||
export default MyApp;
|
27
src/pages/_document.js
Normal file
27
src/pages/_document.js
Normal file
@ -0,0 +1,27 @@
|
||||
import { CssBaseline } from "@nextui-org/react";
|
||||
import Document, { Head, Html, Main, NextScript } from "next/document";
|
||||
import React from "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()}</Head>
|
||||
<body>
|
||||
<Main />
|
||||
<NextScript />
|
||||
</body>
|
||||
</Html>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default MyDocument;
|
5
src/pages/api/hello.js
Normal file
5
src/pages/api/hello.js
Normal file
@ -0,0 +1,5 @@
|
||||
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
|
||||
|
||||
export default function handler(req, res) {
|
||||
res.status(200).json({ name: 'John Doe' })
|
||||
}
|
3
src/pages/index.js
Normal file
3
src/pages/index.js
Normal file
@ -0,0 +1,3 @@
|
||||
export default function Home() {
|
||||
return <></>;
|
||||
}
|
3
src/styles/globals.css
Normal file
3
src/styles/globals.css
Normal file
@ -0,0 +1,3 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
Reference in New Issue
Block a user