1- import Head from "next/head" ;
2- import Image from "next/image" ;
3- import { useRouter } from "next/router" ;
4- import { Translate } from "../_i18n" ;
1+ import Head from 'next/head' ;
2+ import Image from 'next/image' ;
3+ import { useRouter } from 'next/router' ;
4+ import { NextPage } from 'next' ;
5+ import { Translate } from 'i18n' ;
56
6- import styles from " ../styles/Home.module.css" ;
7+ import styles from ' ../styles/Home.module.css' ;
78
8- type HomeProps = {
9+ type PageProps = {
910 t : Translate ;
1011} ;
1112
12- export default function Home ( { t } : HomeProps ) {
13+ const Home : NextPage < PageProps > = ( { t } ) => {
1314 const { locale } = useRouter ( ) ;
1415 return (
1516 < div className = { styles . container } >
@@ -19,7 +20,7 @@ export default function Home({ t }: HomeProps) {
1920 </ Head >
2021
2122 < main className = { styles . main } >
22- < h1 className = { styles . title } > { t ( " welcome" ) } </ h1 >
23+ < h1 className = { styles . title } > { t ( ' welcome' ) } </ h1 >
2324 < p > Current locale: { locale } </ p >
2425 < Image
2526 src = "/takah.jpg"
@@ -29,7 +30,7 @@ export default function Home({ t }: HomeProps) {
2930 />
3031
3132 < p className = { styles . description } >
32- Get started by editing{ " " }
33+ Get started by editing
3334 < code className = { styles . code } > pages/index.js</ code >
3435 </ p >
3536
@@ -70,10 +71,12 @@ export default function Home({ t }: HomeProps) {
7071 target = "_blank"
7172 rel = "noopener noreferrer"
7273 >
73- Powered by{ " " }
74+ Powered by{ ' ' }
7475 < img src = "/vercel.svg" alt = "Vercel Logo" className = { styles . logo } />
7576 </ a >
7677 </ footer >
7778 </ div >
7879 ) ;
79- }
80+ } ;
81+
82+ export default Home ;
0 commit comments