Open Yedidya10 opened 1 year ago
I couldn't reproduce the issue. It's working fine on using usePathname
hook. You can find the working code below. Please send a github repo which reproduces the issue you described
I come across this in the repo: https://github.com/Yedidya10/sharesphere
@Yedidya10 thanks for repo, please add steps for how to reproduce the issue
@Yedidya10 thanks for repo, please add steps for how to reproduce the issue
For sure.
Comment out the code snippet in: src\app\api\auth\[...nextauth]\route.ts page
GoogleProvider({
clientId: getCredentials('GOOGLE').clientId,
clientSecret: getCredentials('GOOGLE').clientSecret,
}),
Please create and add to the .env file:
NODE_ENV=development
NEXTAUTH_URL=http://127.0.0.1:3000
NEXTAUTH_SECRET=my_ultra_secure_nextauth_secret
MONGODB_URI_LOCAL=mongodb://127.0.0.1:27017/share_sphere
Then, run a command: npm run dev
Open the browser at http://127.0.0.1:3000/
And the errors will come up
Is it really because of usePathname
?
I have opened a PR to update the Link component example for Next.js 13 but the only notable change is related to the child <a>
and legacyBehavior
prop: https://github.com/vercel/next.js/pull/36436
Duplicates
Related page
https://github.com/mui/material-ui/blob/v5.14.7/examples/material-ui-nextjs-pages-router-ts/src/Link.tsx
Kind of issue
Missing information
Issue description
I thought that if I change the lines of code related to usePathname (due to the update in Next version 13) it will work,
but I get 3 errors in the browser:
First 2 error messages:
Third error message:
Context 🔦
It would be great if someone could update the example to work in the latest version.