Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
src/pages/_app.tsx
// import App from "next/app";
import type { AppProps /*, AppContext */ } from "next/app";
import Head from "next/head";
import I18n from "i18n/create-provider";
import App from "components/App";
import "styles/index.css";
function MyApp(props: AppProps) {
return (
<>
<Head>
<meta
name="viewport"
content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no, user-scalable=no, viewport-fit=cover"
/>
</Head>
<I18n
requiredNS={props.pageProps.requiredNS}
lng={props.pageProps.lng}
lngDict={props.pageProps.lngDict}
>
<App {...props} />
</I18n>
</>
);
}
// Only uncomment this method if you have blocking data requirements for
// every single page in your application. This disables the ability to
// perform automatic static optimization, causing every page in your app to
// be server-side rendered.
//
// MyApp.getInitialProps = async (appContext: AppContext) => {
// // calls page's `getInitialProps` and fills `appProps.pageProps`
// const appProps = await App.getInitialProps(appContext);
// return { ...appProps }
// }
export default MyApp;yarn create next-app [project-name] -e https://github.com/nextjs-starter/nextjs-webapp-starter
# or
npx create-next-app [project-name] -e https://github.com/nextjs-starter/nextjs-webapp-starter-pcd path/to/app
yarn # or npm iyarn dev
# or
npm run devyarn dev -p <some other port> # e.g. yarn dev -p 3001@types/node and tailwindcss dev dependencies ()lngi18nConfig.defaultLnggetLocaleDataForStaticProps
βββ .github
| βββ contributing.md
βββ __tests__
| βββ Home-es.test.tsx
| βββ Home-fr.test.tsx
| βββ Home.test.tsx
βββ config
| βββ i18n
β β βββ config.ts
| βββ jest
β β βββ cssTransform.js
β β βββ test-utils.tsx
| βββ seo
β β βββ next-seo.config.ts
| βββ app.config.ts
βββ public
β βββ locales
| | βββ en
| | | βββ common.json
| | | βββ footer.json
| | | βββ header.json
| | | βββ index.json
| | βββ es
| | | βββ common.json
| | | βββ footer.json
| | | βββ header.json
| | | βββ index.json
| | βββ fr
| | | βββ common.json
| | | βββ footer.json
| | | βββ header.json
| | | βββ index.json
β βββ android-chrome-192x192.png
β βββ android-chrome-512x512.png
β βββ apple-touch-icon.png
β βββ favicon-16x16.png
β βββ favicon-32x32.png
β βββ favicon.ico
β βββ site.webmanifest
β βββ vercel.svg
βββ src
| βββ components
β β βββ layout
| | | βββ Footer.tsx
| | | βββ Header.tsx
| | | βββ WebApp.tsx
β β βββ App.tsx
β βββ i18n
β β βββ create-provider
| | | βββ browser.tsx
| | | βββ index.tsx
| βββ lib
β β βββ types.ts
β β βββ utils.ts
β βββ pages
β β βββ [lng]
| | | βββ index.tsx
β β βββ api
| | | βββ hello.ts
β β βββ 404.tsx
β β βββ _app.tsx
β β βββ _document.tsx
β β βββ _error.tsx
β β βββ index.tsx
βββ styles
| βββ Footer.module.scss
β βββ Header.module.scss
| βββ Home.module.scss
β βββ index.css
βββ .babelrc
βββ .editorconfig
βββ .env.development
βββ .env.production
βββ .gitignore
βββ CODE_OF_CONDUCT.md
βββ README.md
βββ changelog.md
βββ jest.config.js
βββ license.md
βββ next-env.d.ts
βββ next.config.js
βββ package.json
βββ postcss.config.js
βββ tailwind.config.js
βββ tsconfig.json
βββ yarn.lock