Initial commit from Create Next App
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import type { AppProps } from 'next/app'
|
||||
|
||||
const MyApp = ({ Component, pageProps }: AppProps) => {
|
||||
return (
|
||||
<Component {...pageProps} />
|
||||
)
|
||||
}
|
||||
|
||||
export default MyApp
|
||||
@@ -0,0 +1,12 @@
|
||||
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
|
||||
import type { NextApiRequest, NextApiResponse } from 'next'
|
||||
|
||||
type Data = {
|
||||
message: string
|
||||
}
|
||||
|
||||
export const hello = (req: NextApiRequest, res: NextApiResponse<Data>) => {
|
||||
res.status(200).json({ message: 'Hello!' })
|
||||
}
|
||||
|
||||
export default hello
|
||||
@@ -0,0 +1,11 @@
|
||||
import type { NextPage } from 'next'
|
||||
|
||||
const Home: NextPage = () => {
|
||||
return (
|
||||
<>
|
||||
<h1>Next Js</h1>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default Home
|
||||
Reference in New Issue
Block a user