summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2021-12-12 23:23:52 +0100
committerArmand Philippot <git@armandphilippot.com>2021-12-12 23:23:52 +0100
commit6c1cbe9f4d956ad6140c780b2f88f5de4e4eee67 (patch)
tree86ecc5b223a771d90dd977bc3917a8dacedb4128
parentf3d462c8183598362605dc53589583f2859f20b9 (diff)
build: move global styles and pages inside src directory
-rw-r--r--pages/_app.tsx8
-rw-r--r--src/pages/_app.tsx8
-rw-r--r--src/pages/api/hello.ts (renamed from pages/api/hello.ts)8
-rw-r--r--src/pages/index.tsx (renamed from pages/index.tsx)14
-rw-r--r--src/styles/Home.module.css (renamed from styles/Home.module.css)2
-rw-r--r--src/styles/globals.css (renamed from styles/globals.css)0
6 files changed, 20 insertions, 20 deletions
diff --git a/pages/_app.tsx b/pages/_app.tsx
deleted file mode 100644
index 3f5c9d5..0000000
--- a/pages/_app.tsx
+++ /dev/null
@@ -1,8 +0,0 @@
-import '../styles/globals.css'
-import type { AppProps } from 'next/app'
-
-function MyApp({ Component, pageProps }: AppProps) {
- return <Component {...pageProps} />
-}
-
-export default MyApp
diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx
new file mode 100644
index 0000000..f3f9628
--- /dev/null
+++ b/src/pages/_app.tsx
@@ -0,0 +1,8 @@
+import '../styles/globals.css';
+import type { AppProps } from 'next/app';
+
+function MyApp({ Component, pageProps }: AppProps) {
+ return <Component {...pageProps} />;
+}
+
+export default MyApp;
diff --git a/pages/api/hello.ts b/src/pages/api/hello.ts
index f8bcc7e..89e4d6b 100644
--- a/pages/api/hello.ts
+++ b/src/pages/api/hello.ts
@@ -1,13 +1,13 @@
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
-import type { NextApiRequest, NextApiResponse } from 'next'
+import type { NextApiRequest, NextApiResponse } from 'next';
type Data = {
- name: string
-}
+ name: string;
+};
export default function handler(
req: NextApiRequest,
res: NextApiResponse<Data>
) {
- res.status(200).json({ name: 'John Doe' })
+ res.status(200).json({ name: 'John Doe' });
}
diff --git a/pages/index.tsx b/src/pages/index.tsx
index 72a4a59..da31f7d 100644
--- a/pages/index.tsx
+++ b/src/pages/index.tsx
@@ -1,7 +1,7 @@
-import type { NextPage } from 'next'
-import Head from 'next/head'
-import Image from 'next/image'
-import styles from '../styles/Home.module.css'
+import type { NextPage } from 'next';
+import Head from 'next/head';
+import Image from 'next/image';
+import styles from '../styles/Home.module.css';
const Home: NextPage = () => {
return (
@@ -66,7 +66,7 @@ const Home: NextPage = () => {
</a>
</footer>
</div>
- )
-}
+ );
+};
-export default Home
+export default Home;
diff --git a/styles/Home.module.css b/src/styles/Home.module.css
index 32a57d5..eb806ad 100644
--- a/styles/Home.module.css
+++ b/src/styles/Home.module.css
@@ -93,7 +93,7 @@
}
.card h2 {
- margin: 0 0 1rem 0;
+ margin: 0 0 1rem;
font-size: 1.5rem;
}
diff --git a/styles/globals.css b/src/styles/globals.css
index e5e2dcc..e5e2dcc 100644
--- a/styles/globals.css
+++ b/src/styles/globals.css