Skip to content

Commit 8efff6f

Browse files
committed
Format tsx files
1 parent 67f015c commit 8efff6f

File tree

3 files changed

+24
-16
lines changed

3 files changed

+24
-16
lines changed

.vscode/settings.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"editor.formatOnSave": false,
3+
"editor.codeActionsOnSave": {
4+
"source.fixAll.eslint": true
5+
}
6+
}

pages/_app.tsx

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
import '../styles/globals.css'
1+
import { FC } from 'react';
2+
import { AppProps } from 'next/app';
3+
import '../styles/globals.css';
24

3-
function MyApp({ Component, pageProps }) {
4-
return <Component {...pageProps} />
5-
}
5+
const MyApp: FC<AppProps> = ({ Component, pageProps }: AppProps) => {
6+
return <Component {...pageProps} />;
7+
};
68

7-
export default MyApp
9+
export default MyApp;

pages/index.tsx

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import Head from 'next/head'
2-
import styles from '../styles/Home.module.css'
1+
import { NextPage } from 'next';
2+
import Head from 'next/head';
3+
import styles from '../styles/Home.module.css';
34

4-
export default function Home() {
5+
const Home: NextPage = () => {
56
return (
67
<div className={styles.container}>
78
<Head>
@@ -32,16 +33,14 @@ export default function Home() {
3233

3334
<a
3435
href="https://github.com/vercel/next.js/tree/master/examples"
35-
className={styles.card}
36-
>
36+
className={styles.card}>
3737
<h3>Examples &rarr;</h3>
3838
<p>Discover and deploy boilerplate example Next.js projects.</p>
3939
</a>
4040

4141
<a
4242
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
43-
className={styles.card}
44-
>
43+
className={styles.card}>
4544
<h3>Deploy &rarr;</h3>
4645
<p>
4746
Instantly deploy your Next.js site to a public URL with Vercel.
@@ -54,12 +53,13 @@ export default function Home() {
5453
<a
5554
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
5655
target="_blank"
57-
rel="noopener noreferrer"
58-
>
56+
rel="noopener noreferrer">
5957
Powered by{' '}
6058
<img src="/vercel.svg" alt="Vercel Logo" className={styles.logo} />
6159
</a>
6260
</footer>
6361
</div>
64-
)
65-
}
62+
);
63+
};
64+
65+
export default Home;

0 commit comments

Comments
 (0)