I’m a bit confused on the implementation of the credentials provider and the redirects. The documentation says that the credentials provider doesn’t support a callback and its for the OAuth providers. This is fine. However, instead of staying on the page and flashing an error message or even logging in like in this video it redirects to https://localhost/api/auth/callback/[credentials-provider-name]. Which doesn’t
Tag: next.js
Reactjs/Nextjs onClick event not working for external component
I have a main page, with a button component i create to reuse in my project. My issue is when i add the onClick event to my external component, the click event is not working, but is i create the same button inside my main page, the click event works just fine Button Component This works on main page Button
Next.js site has favicon in chrome but not in brave
I’m developing my first next.js site and I’m setting the favicon in index.js as follows: Originally I was using a setup where my source files were all in the root directory. I now decided to move them to a src directory. Since then I have observed the following two weird behaviors: The site has a favicon in chrome but not
Next.js – best way to serve static JS from a node module’s “dist” folder
I’m working with an application that uses Tesseract (OCR) to read text from images. I would like to take some JS files from node_modules/tesseract.js/dist and make them downloadable in the browser. I know I can just copy the files to ./public and next.js will serve it statically from there, but then if I update my version of Tesseract, I may
NextJS render content from a different page
I’ve two routes like, app/products => pages/products/index.js app/products/1 => pages/products/[page].js Here both app/products and app/product/1 will render the same content (same product items), is it possible to render app/products/1 content in app/products without writing duplicate code? I could find anything similar in their documentation. Thanks. Answer The easiest way is to abstract the content from the page level. No need
how to pass an object as a prop in nextjs
I cant quite figure out how I am supposed to pass an object as a prop when using useState in Next JS. I have a lorem ipsum generator that I created in javascript functions. I have a component called Paragraphs that houses it. I need to pass in two properties, a number of paragraphs. a sentence length. The paragraph length
Firebase does not authenticate when using next auth
I’m using next-auth with firebase adapter. Everything is working fine in terms of saving users in database, but something is not working in terms of authentication. My users can log in, but are not authenticated. The Observer returns ‘no user’, but I’m logged in. Answer You’re not seeing a logged in user because the firebase auth is being done on
Best way to include reusable SVG in React
I am including SVG as reusable component on my react application. Sample of SVG component is as follows On page level, I am importing IconComponent and reusing it. Is there any other best way to include reusable SVGs in React pages which improves performance/page load? Answer 1. SVG with webpack command line webpack.config.js then 2. SVG as component also you
Nextjs different slug names for the same dynamic path [closed]
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 10 days ago. Improve this question This is my folder structure of my nextjs app and Iam getting this error: Failed to reload dynamic routes: Error: You cannot
Next js shows a 0 at the top for one second on load page content
in my nextjs app, when the page loads there is a 0 in the top left corner for a split second. In that page, I get some data from Sanity CMS with getStaticProps and return the content.. I notice that even if I return a empty fraction the 0 appears. If I return just the empty fraction without checking for