Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Fix Typo error of fetchUsers to fetchUser in not-found.mdx #52486

Closed
darshanjain-entrepreneur opened this issue Jul 10, 2023 · 2 comments
Closed
Labels
Documentation Related to Next.js' official documentation. locked

Comments

@darshanjain-entrepreneur
Copy link
Contributor

darshanjain-entrepreneur commented Jul 10, 2023

What is the improvement or update you wish to see?

h
async function fetchUsers(id) { // here fetchUsers should be change to fetchUser
const res = await fetch('https://...')
if (!res.ok) return undefined
return res.json()
}

Is there any context that might help us understand?

async function fetchUsers(id) { // Here instead of fetchUsers it should be fetchUser
const res = await fetch('https://...')
if (!res.ok) return undefined
return res.json()
}

export default async function Profile({ params }) {
const user = await fetchUser(params.id)

if (!user) {
notFound()
}

// ...
}


### Does the docs page already exist? Please link to it.

https://nextjs.org/docs/app/api-reference/functions/not-found
@darshanjain-entrepreneur darshanjain-entrepreneur added the Documentation Related to Next.js' official documentation. label Jul 10, 2023
darshanjain-entrepreneur added a commit to darshanjain-entrepreneur/next.js that referenced this issue Jul 10, 2023
timneutkens pushed a commit that referenced this issue Jul 10, 2023
#52486 

Here I fixed the typo error of fetchUsers to fetchUser in
docs/api-reference/04-functions/not-found.mdx

async function fetchUser(id) { // Here instead of fetchUsers i changed
it to fetchUser
const res = await fetch('https://...')
if (!res.ok) return undefined
return res.json()
}

export default async function Profile({ params }) {
const user = await fetchUser(params.id)

if (!user) {
notFound()
}

// ...
}

https://nextjs.org/docs/app/api-reference/functions/not-found
@balazsorban44
Copy link
Member

#52487 closed this, thank you!

Tip: You can add the phrase "Fixes #issuenumber" to the description of a PR and it will auto-close the related issue. See: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword

@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2023

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot added the locked label Aug 9, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation Related to Next.js' official documentation. locked
Projects
None yet
Development

No branches or pull requests

2 participants