Javascript – Display page in nextjs server side
I'm using Next.JS 14, I want to show a page to the client if the request is coming from a browser but if it's not from a browser redirect to another website. Base on this code section I've done the…
I'm using Next.JS 14, I want to show a page to the client if the request is coming from a browser but if it's not from a browser redirect to another website. Base on this code section I've done the…
I have an issue that only appears on the production environment. It uploads an image on uploadthing, but then does not redirect to the next page. Error: UploadThingError: Something went wrong. Please report this to UploadThing. at O (323-ac80e073b694958b.js:1:134496) at…
I am building a logic to upload videos to cloudinary using node.js, next.js and multer package. I have a mongodb document that I would like to store the video url and publicid of the video once cloudinary upload function completes.…
I'm working with Next.js and have the following routes: /@modal/(.)snippets/[id]/page.tsx (for a modal) /snippets/[id]/page.tsx (for individual snippets) /snippets/new/page.tsx (for creating a new snippet) The problem occurs when I navigate to /snippets/new — instead of opening the new snippet creation page,…
When page loads, clerk components such as or takes longer to be rendered as compared to other components (NextJs 14). Is there an issue in the way I am coding thats causing this problem? Here is a simplified version of…
I'm currently working with Next.js 14 and its App Router paradigm to manage navigation within my application. I have implemented a background color transition on certain pages that is triggered when navigating between routes. However, I want this transition to…
This is in a NextJS version 14.2.7 app. I have setup up an api under the following path. src/app/api/posts/route.ts When I call it from a client component as follows, works fine. const loadMorePosts = async () => { const res…
I've got a weird issue with my nextjs app on a ubuntu box. I'm using nginx. I have the uploads folder in the nginx config for the site: location /uploads { alias /home/ubuntu/staging/thomson-print-portal/current/public/uploads; expires 1y; add_header Cache-Control "public, max-age=31536000, immutable";…
When the first request is sent, isVoting will be set to "true". In this case, until isVoting is set to "false", another request should not be allowed to be sent. But somehow isVoting is still "false" when i try to…
Is it possible to navigate or go to another route using 'react-scroll' with NextJs14? For example: I want to navigate to the Blog Page. Or should I use Link from 'next/link' with pathname or params to extract the route name…