Unverified Commit 85d58298 authored by Diego Gennaro's avatar Diego Gennaro Committed by GitHub

Add example: Unsplash integration (#16142)

* nextjs with unsplash initial commit

* update demo link

* remove isomorphic-unfetch

* remove ssr on collection page

* fix style issues

* fix import/no-anonymous-default-export

* usign fetch instead of request

* remove credits

* improve instructions

* improve instructions

* Updated readme steps and images

* Updated readme

* Updated gitignore
Co-authored-by: 's avatarLuis Alvarez <luis@vercel.com>
parent 4a981428
UNSPLASH_ACCESS_KEY=
UNSPLASH_USER=
\ No newline at end of file
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# next.js
/.next/
/out/
# production
/build
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local
# vercel
.vercel
# Using Next.js with Unsplash API
This is an example of how [Unsplash](https://unsplash.com/) can be used with `Next.js`
## Deploy your own
Once you have access to [the environment variables you'll need](#step-2-set-up-environment-variables), deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example):
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/git?c=1&s=https://github.com/vercel/next.js/tree/canary/examples/with-unsplash&env=UNSPLASH_ACCESS_KEY,UNSPLASH_USER&envDescription=Required%20to%20connect%20the%20app%20with%20Unsplash&envLink=https://github.com/vercel/next.js/tree/canary/examples/with-unsplash%23step-2-set-up-environment-variables)
## How to use
### Using `create-next-app`
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example:
```bash
npx create-next-app --example with-unsplash with-unsplash-app
# or
yarn create next-app --example with-unsplash with-unsplash-app
```
## Configuration
First, you'll need to [create an account on Unsplash](https://unsplash.com/) if you don't have one already. Once that's done, follow the steps below.
### Step 1. Create an app on Unsplash
To create a new application on Unsplash, click [here](https://unsplash.com/oauth/applications/new) or go to https://unsplash.com/oauth/applications/new.
Before creating an app you'll have to accept the terms for API use:
![Accept Unsplash app terms](./docs/app-terms.png)
Then, fill the form with the app name and description, and click on on **Create application** to finish the creation of your app:
![Form to fill app name and description](./docs/app-form.png)
### Step 2. Set up environment variables
After creating the app, you should be able to see the API keys in the settings page of your app:
![API Keys of Unsplash app](./docs/api-keys.png)
We'll need those API keys to connect the example with your Unsplash app.
First, copy the `.env.local.example` file in this directory to `.env.local` (which will be ignored by Git):
```bash
cp .env.local.example .env.local
```
Then set each variable on `.env.local`:
- `UNSPLASH_ACCESS_KEY` should be the **Access Key** of your Unsplash app
- `UNSPLASH_USER` should be any valid Unsplash username. The example will use the photos of the user selected here.
### Step 3. Run Next.js in development mode
```bash
npm install
npm run dev
# or
yarn install
yarn dev
```
Your app should be up and running on [http://localhost:3000](http://localhost:3000)! If it doesn't work, post on [GitHub discussions](https://github.com/vercel/next.js/discussions).
### Step 4. Deploy on Vercel
You can deploy this app to the cloud with [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
#### Deploy Your Local Project
To deploy your local project to Vercel, push it to GitHub/GitLab/Bitbucket and [import to Vercel](https://vercel.com/import/git?utm_source=github&utm_medium=readme&utm_campaign=next-example).
**Important**: When you import your project on Vercel, make sure to click on **Environment Variables** and set them to match your `.env.local` file.
#### Deploy from Our Template
Alternatively, you can deploy using our template by clicking on the Deploy button below.
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/git?c=1&s=https://github.com/vercel/next.js/tree/canary/examples/with-unsplash&env=UNSPLASH_ACCESS_KEY,UNSPLASH_USER&envDescription=Required%20to%20connect%20the%20app%20with%20Unsplash&envLink=https://github.com/vercel/next.js/tree/canary/examples/with-unsplash%23step-2-set-up-environment-variables)
.chips {
padding: 12px 0;
text-align: center;
}
a.chip {
display: inline-block;
background: #e0e0e0;
color: #333;
text-decoration: none;
padding: 0 12px;
border-radius: 10px;
font-size: 13px;
margin: 0 5px 3px 0;
}
a.chip:hover {
background: #ccc;
}
.chip_remove {
display: inline-block;
background: #aaa;
border: 0;
height: 15px;
width: 15px;
border-radius: 50%;
padding: 0;
margin: 0 -10px 0 5px;
cursor: pointer;
font: inherit;
line-height: 15px;
}
.chip_remove:after {
color: #333;
content: 'x';
}
.chip_remove:hover {
background: #999;
}
.chip_remove:active {
background: #777;
}
import useSWR from 'swr'
import fetcher from 'libs/fetcher'
import Link from 'next/link'
import styles from './Collections.module.css'
interface CollectionProps {
id_collection?: number
}
const Collections = ({ id_collection }: CollectionProps) => {
const { data, error } = useSWR(
'/api/collection' + (id_collection ? `/${id_collection}` : ''),
fetcher
)
if (error) return <div>failed to load</div>
if (!data) return <div>loading...</div>
return (
<div className={styles.chips}>
{data.map(({ id, title, slug }) =>
id_collection ? (
<Link href="/" key={`collection_${slug}`}>
<a className={styles.chip}>
{title}
<Link href="/">
<button
type="button"
className={styles.chip_remove}
aria-label="Return to home"
></button>
</Link>
</a>
</Link>
) : (
<Link
href={{ pathname: '/collection/[slug]', query: { id: id } }}
as={`/collection/${slug}?id=${id}`}
key={`collection_${slug}`}
>
<a className={styles.chip}>{title}</a>
</Link>
)
)}
</div>
)
}
export default Collections
.gallery_container {
font-size: 1.2rem;
line-height: 1.5;
column-count: 3;
column-gap: 20px;
}
@media (max-width: 990px) {
.gallery_container {
column-count: 2;
}
}
@media (max-width: 790px) {
.gallery_container {
column-count: 1;
}
}
import useSWR from 'swr'
import fetcher from 'libs/fetcher'
import styles from './Gallery.module.css'
import UImage from 'components/UImage'
interface GalleryProps {
id_collection?: number
}
const Gallery = ({ id_collection }: GalleryProps) => {
const { data, error } = useSWR(
'/api/photo' + (id_collection ? `/${id_collection}` : ''),
fetcher
)
if (error) return <div>failed to load</div>
if (!data) return <div>loading...</div>
return (
<section className={styles.gallery_container}>
{data.map(({ id, urls, alt_description, description }) => (
<UImage
id={id}
urls={urls}
altDescription={alt_description ? alt_description : description}
key={`${id}_uimage_component`}
/>
))}
</section>
)
}
export default Gallery
import Head from 'next/head'
import User from 'components/User'
import styles from './layout.module.css'
export const siteTitle = 'Unsplash Profile with Nextjs'
const Layout = ({ children }) => {
return (
<div className={styles.container}>
<Head>
<link rel="icon" href="/favicon.ico" />
<meta name="description" content={siteTitle} />
{/* <meta property="og:image" content={img} /> */}
<meta name="og:title" content={siteTitle} />
<meta name="twitter:card" content="summary_large_image" />
<meta name="robots" content="noindex" />
</Head>
<User />
<main>{children}</main>
</div>
)
}
export default Layout
.container {
padding: 0 1rem;
margin: 3rem auto 6rem;
}
.headerHomeImage {
width: 8rem;
height: 8rem;
}
.backToHome {
margin: 3rem 0 0;
}
import styles from './Social.module.css'
import UIcon from 'components/UIcon'
const Social = ({ user }) => {
return (
<div className={styles.social_container}>
{user.twitter_username && (
<UIcon
url={'https://www.twitter.com/' + user.twitter_username}
name="twitter"
/>
)}
{user.instagram_username && (
<UIcon
url={'https://www.instagram.com/' + user.instagram_username}
name="instagram"
/>
)}
{user.username && (
<UIcon
url={'https://www.unsplash.com/@' + user.username}
name="unsplash"
/>
)}
</div>
)
}
export default Social
.stats_container {
padding: 10px 0px;
font-size: 12px;
}
import useSWR from 'swr'
import fetcher from 'libs/fetcher'
import styles from './Stats.module.css'
const Stats = () => {
const { data, error } = useSWR('/api/stats', fetcher)
if (error) return <div>failed to load</div>
return (
<div className={styles.stats_container}>
<strong>Stats </strong>
downloads: {data ? data.downloads.total : '...'} | views:{' '}
{data ? data.views.total : '...'} | likes:{' '}
{data ? data.likes.total : '...'}
</div>
)
}
export default Stats
.icon {
padding: 20px;
float: left;
}
.icon_svg {
width: 20px;
}
import styles from './UIcon.module.css'
const UIcon = ({ url, name }) => {
return (
<a
className={styles.icon}
href={url}
target="_blank"
rel="noopener noreferrer"
>
<img
className={styles.icon_svg}
src={`/images/${name}.svg`}
alt={`${name} icon`}
/>
</a>
)
}
export default UIcon
.img {
display: inline-block;
width: 100%;
margin: 5px 0;
}
.actions {
position: relative;
bottom: 55px;
right: 10px;
width: 100%;
height: 0px;
text-align: right;
float: left;
}
.actions a {
background-color: #fff;
padding: 5px;
border-radius: 5px;
margin: 5px;
float: right;
}
import styles from './UImage.module.css'
import UIcon from 'components/UIcon'
const Uimage = ({ id, urls, altDescription }) => {
return (
<div key={`uimg_container_${id}`}>
<img className={styles.img} src={urls.small} alt={altDescription} />
<div className={styles.actions}>
<UIcon url={`/api/photo/download/${id}`} name="download" />
</div>
</div>
)
}
export default Uimage
.header {
display: flex;
flex-direction: column;
align-items: center;
}
.headerImage {
width: 6rem;
height: 6rem;
}
.headerHomeImage {
width: 8rem;
height: 8rem;
}
.borderCircle {
border-radius: 9999px;
}
.headingLg {
font-size: 1.5rem;
line-height: 1.4;
margin: 1rem 0;
}
import useSWR from 'swr'
import fetcher from 'libs/fetcher'
import Link from 'next/link'
import styles from './User.module.css'
import Social from 'components/Social'
const User = () => {
const { data, error } = useSWR('/api/user', fetcher)
if (error) return <div>failed to load</div>
return (
<header className={styles.header}>
<Link href="/">
<a>
{data && (
<img
src={data.profile_image.large}
className={`${styles.headerImage} ${styles.borderCircle}`}
alt={data.name}
/>
)}
</a>
</Link>
<h2 className={styles.headingLg}>
<Link href="/">
<a>{data ? data.name : ''}</a>
</Link>
</h2>
{data ? <Social user={data} /> : ''}
<p>{data ? data.bio : ''}</p>
</header>
)
}
export default User
export default async function f<JSON = any>(
input: RequestInfo,
init?: RequestInit
): Promise<JSON> {
const res = await fetch(input, init)
return res.json()
}
const slug = (str: string) => {
return str
.toLowerCase()
.replace(/\s/g, '-')
.normalize('NFD')
.replace(/[\u0300-\u036f]/g, '')
}
export default slug
/// <reference types="next" />
/// <reference types="next/types/global" />
{
"name": "with-unsplash",
"version": "1.0.0",
"license": "MIT",
"description": "Using Next.js with Unsplash API",
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"dependencies": {
"next": "^9.5.1",
"react": "16.13.1",
"react-dom": "16.13.1",
"swr": "^0.3.0",
"unsplash-js": "^6.0.0"
},
"devDependencies": {
"@types/node": "^14.0.27",
"@types/react": "^16.9.46",
"@types/request": "^2.48.5",
"@types/unsplash-js": "^6.0.1",
"request": "^2.88.2",
"typescript": "^3.9.7"
}
}
import 'styles/global.css'
export default function App({ Component, pageProps }) {
return <Component {...pageProps} />
}
import Document, { Html, Head, Main, NextScript } from 'next/document'
class MyDocument extends Document {
static async getInitialProps(ctx) {
const initialProps = await Document.getInitialProps(ctx)
return { ...initialProps }
}
render() {
return (
<Html lang="en">
<Head />
<body>
<Main />
<NextScript />
</body>
</Html>
)
}
}
export default MyDocument
import { NextApiRequest, NextApiResponse } from 'next'
import Unsplash, { toJson } from 'unsplash-js'
export default function getCollection(
req: NextApiRequest,
res: NextApiResponse
) {
const {
query: { id },
} = req
return new Promise((resolve) => {
const u = new Unsplash({ accessKey: process.env.UNSPLASH_ACCESS_KEY })
u.collections
.getCollection(parseInt(id.toString()))
.then(toJson)
.then((json) => {
res.statusCode = 200
res.setHeader('Content-Type', 'application/json')
res.setHeader('Cache-Control', 'max-age=180000')
res.end(JSON.stringify([json]))
resolve()
})
.catch((error) => {
res.json(error)
res.status(405).end()
resolve()
})
})
}
import { NextApiRequest, NextApiResponse } from 'next'
import Unsplash, { toJson } from 'unsplash-js'
import slug from 'libs/slug'
export default function getCollections(
req: NextApiRequest,
res: NextApiResponse
) {
return new Promise((resolve) => {
const u = new Unsplash({ accessKey: process.env.UNSPLASH_ACCESS_KEY })
u.users
.collections(process.env.UNSPLASH_USER, 1, 15, 'updated')
.then(toJson)
.then((json) => {
json.map((c) => (c.slug = slug(c.title)))
res.statusCode = 200
res.setHeader('Content-Type', 'application/json')
res.setHeader('Cache-Control', 'max-age=180000')
res.end(JSON.stringify(json))
resolve()
})
.catch((error) => {
res.json(error)
res.status(405).end()
resolve()
})
})
}
import { NextApiRequest, NextApiResponse } from 'next'
import Unsplash, { toJson } from 'unsplash-js'
export default function getCollectionPhotos(
req: NextApiRequest,
res: NextApiResponse
) {
const {
query: { id },
} = req
return new Promise((resolve) => {
const u = new Unsplash({ accessKey: process.env.UNSPLASH_ACCESS_KEY })
u.collections
.getCollectionPhotos(parseInt(id.toString()))
.then(toJson)
.then((json) => {
res.statusCode = 200
res.setHeader('Content-Type', 'application/json')
res.setHeader('Cache-Control', 'max-age=180000')
res.end(JSON.stringify(json))
resolve()
})
.catch((error) => {
res.json(error)
res.status(405).end()
resolve()
})
})
}
import { NextApiRequest, NextApiResponse } from 'next'
import Unsplash, { toJson } from 'unsplash-js'
import fetch from 'node-fetch'
global.fetch = fetch
export default function download(req: NextApiRequest, res: NextApiResponse) {
const {
query: { id },
} = req
const u = new Unsplash({ accessKey: process.env.UNSPLASH_ACCESS_KEY })
return new Promise((resolve) => {
u.photos
.getPhoto(id.toString())
.then(toJson)
.then((json) => {
u.photos.downloadPhoto(json)
const filePath = json.links.download
const fileName = id + '.jpg'
res.setHeader('content-disposition', 'attachment; filename=' + fileName)
fetch(filePath)
.then((r) => r.buffer())
.then((buff) => {
res.end(buff)
resolve()
})
.catch((error) => {
res.json(error)
res.status(405).end()
resolve()
})
})
.catch((error) => {
res.json(error)
res.status(405).end()
resolve()
})
})
}
import { NextApiRequest, NextApiResponse } from 'next'
import Unsplash, { toJson } from 'unsplash-js'
export default function getPhotos(req: NextApiRequest, res: NextApiResponse) {
return new Promise((resolve) => {
const u = new Unsplash({ accessKey: process.env.UNSPLASH_ACCESS_KEY })
u.users
.photos(process.env.UNSPLASH_USER, 1, 50, 'latest')
.then(toJson)
.then((json: string) => {
res.statusCode = 200
res.setHeader('Content-Type', 'application/json')
res.setHeader('Cache-Control', 'max-age=180000')
res.end(JSON.stringify(json))
resolve()
})
.catch((error) => {
res.json(error)
res.status(405).end()
resolve()
})
})
}
import { NextApiRequest, NextApiResponse } from 'next'
import Unsplash, { toJson } from 'unsplash-js'
export default function getStats(req: NextApiRequest, res: NextApiResponse) {
return new Promise((resolve) => {
const u = new Unsplash({ accessKey: process.env.UNSPLASH_ACCESS_KEY })
u.users
.statistics(process.env.UNSPLASH_USER, 'days', 30)
.then(toJson)
.then((json) => {
res.statusCode = 200
res.setHeader('Content-Type', 'application/json')
res.setHeader('Cache-Control', 'max-age=180000')
res.end(JSON.stringify(json))
resolve()
})
.catch((error) => {
res.json(error)
res.status(405).end()
resolve()
})
})
}
import { NextApiRequest, NextApiResponse } from 'next'
import Unsplash, { toJson } from 'unsplash-js'
export default function getUser(req: NextApiRequest, res: NextApiResponse) {
return new Promise((resolve) => {
const u = new Unsplash({ accessKey: process.env.UNSPLASH_ACCESS_KEY })
u.users
.profile(process.env.UNSPLASH_USER)
.then(toJson)
.then((json) => {
res.statusCode = 200
res.setHeader('Content-Type', 'application/json')
res.setHeader('Cache-Control', 'max-age=180000')
res.end(JSON.stringify(json))
resolve()
})
.catch((error) => {
res.json(error)
res.status(405).end()
resolve()
})
})
}
import Head from 'next/head'
import Layout, { siteTitle } from 'components/Layout'
import Gallery from 'components/Gallery'
import Collections from 'components/Collections'
import { useRouter } from 'next/router'
const Collection = () => {
const router = useRouter()
const collection_id = router.query.id
? parseInt(router.query.id.toString())
: null
return (
<Layout>
<Head>
<title>{siteTitle}</title>
</Head>
<Collections id_collection={collection_id} />
<Gallery id_collection={collection_id} />
</Layout>
)
}
export default Collection
import Head from 'next/head'
import Layout, { siteTitle } from 'components/Layout'
import Gallery from 'components/Gallery'
import Stats from 'components/Stats'
import Collections from 'components/Collections'
const Home = () => {
return (
<Layout>
<Head>
<title>{siteTitle}</title>
</Head>
<Stats />
<Collections />
<Gallery />
</Layout>
)
}
export default Home
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"/></svg>
\ No newline at end of file
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Instagram icon</title><path d="M12 0C8.74 0 8.333.015 7.053.072 5.775.132 4.905.333 4.14.63c-.789.306-1.459.717-2.126 1.384S.935 3.35.63 4.14C.333 4.905.131 5.775.072 7.053.012 8.333 0 8.74 0 12s.015 3.667.072 4.947c.06 1.277.261 2.148.558 2.913.306.788.717 1.459 1.384 2.126.667.666 1.336 1.079 2.126 1.384.766.296 1.636.499 2.913.558C8.333 23.988 8.74 24 12 24s3.667-.015 4.947-.072c1.277-.06 2.148-.262 2.913-.558.788-.306 1.459-.718 2.126-1.384.666-.667 1.079-1.335 1.384-2.126.296-.765.499-1.636.558-2.913.06-1.28.072-1.687.072-4.947s-.015-3.667-.072-4.947c-.06-1.277-.262-2.149-.558-2.913-.306-.789-.718-1.459-1.384-2.126C21.319 1.347 20.651.935 19.86.63c-.765-.297-1.636-.499-2.913-.558C15.667.012 15.26 0 12 0zm0 2.16c3.203 0 3.585.016 4.85.071 1.17.055 1.805.249 2.227.415.562.217.96.477 1.382.896.419.42.679.819.896 1.381.164.422.36 1.057.413 2.227.057 1.266.07 1.646.07 4.85s-.015 3.585-.074 4.85c-.061 1.17-.256 1.805-.421 2.227-.224.562-.479.96-.899 1.382-.419.419-.824.679-1.38.896-.42.164-1.065.36-2.235.413-1.274.057-1.649.07-4.859.07-3.211 0-3.586-.015-4.859-.074-1.171-.061-1.816-.256-2.236-.421-.569-.224-.96-.479-1.379-.899-.421-.419-.69-.824-.9-1.38-.165-.42-.359-1.065-.42-2.235-.045-1.26-.061-1.649-.061-4.844 0-3.196.016-3.586.061-4.861.061-1.17.255-1.814.42-2.234.21-.57.479-.96.9-1.381.419-.419.81-.689 1.379-.898.42-.166 1.051-.361 2.221-.421 1.275-.045 1.65-.06 4.859-.06l.045.03zm0 3.678c-3.405 0-6.162 2.76-6.162 6.162 0 3.405 2.76 6.162 6.162 6.162 3.405 0 6.162-2.76 6.162-6.162 0-3.405-2.76-6.162-6.162-6.162zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm7.846-10.405c0 .795-.646 1.44-1.44 1.44-.795 0-1.44-.646-1.44-1.44 0-.794.646-1.439 1.44-1.439.793-.001 1.44.645 1.44 1.439z"/></svg>
\ No newline at end of file
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Twitter icon</title><path d="M23.954 4.569c-.885.389-1.83.654-2.825.775 1.014-.611 1.794-1.574 2.163-2.723-.951.555-2.005.959-3.127 1.184-.896-.959-2.173-1.559-3.591-1.559-2.717 0-4.92 2.203-4.92 4.917 0 .39.045.765.127 1.124C7.691 8.094 4.066 6.13 1.64 3.161c-.427.722-.666 1.561-.666 2.475 0 1.71.87 3.213 2.188 4.096-.807-.026-1.566-.248-2.228-.616v.061c0 2.385 1.693 4.374 3.946 4.827-.413.111-.849.171-1.296.171-.314 0-.615-.03-.916-.086.631 1.953 2.445 3.377 4.604 3.417-1.68 1.319-3.809 2.105-6.102 2.105-.39 0-.779-.023-1.17-.067 2.189 1.394 4.768 2.209 7.557 2.209 9.054 0 13.999-7.496 13.999-13.986 0-.209 0-.42-.015-.63.961-.689 1.8-1.56 2.46-2.548l-.047-.02z"/></svg>
\ No newline at end of file
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Unsplash icon</title><path d="M7.5 6.75V0h9v6.75h-9zm9 3.75H24V24H0V10.5h7.5v6.75h9V10.5z"/></svg>
\ No newline at end of file
html,
body {
padding: 0;
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
line-height: 1.6;
font-size: 18px;
background: #fff;
}
* {
box-sizing: border-box;
}
a {
color: inherit;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
img {
max-width: 100%;
display: block;
}
{
"compilerOptions": {
"baseUrl": ".",
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve"
},
"exclude": ["node_modules"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"]
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment