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 upgraded a simple website to Next.js 15.0.1 with some static pages. But when working on my blog post page it shows that the route is static with the following code: import SectionWrapper from "@/components/shared/section-wrapper"; export default async function…
I'm working on a React Native project with TypeScript, and I'm trying to import an image like this: Cannot find module '@/assets/image.png' or its corresponding type declarations.ts I've already checked that the image exists at the specified path. How do…
I'm creating a screenshot submission form, and I want to compress the image before uploading it to my server. I've got the process so it works, but whenever I test it the first time I try submitting it fails. Clicking…
I am trying to implement dual theme (dark & light) in Next JS using MUI using use context method. It gives me this error: ⨯ srcapppage.tsx (6:50) @ useThemeContext ⨯ TypeError: (0 , _providers_theme_context_provider__WEBPACK_IMPORTED_MODULE_1__.useThemeContext) is not a function at Home…
We're about to start a Next.js project using Tailwind for styling. We're fairly new to both technologies but we've started to pull together the UI and so far so good. However, we're seeing a lot of replication in styling. For…
I'm having a problem on how to refresh my screen when clicking back button from browser. The weird part of this is it's only replicable when deployed on staging servers. In localhost I didn't encounter any of this since it…
I am using the Next.js App Router architecture, and I have a post page that calls an API and passes the data to a component. I have already implemented simple interactions like clicking to change some styles, etc. However, how…
I'm working on a Next.js project with Supabase authentication, and I'm encountering an issue where the user session is not being detected in the middleware after a successful authentication callback. This causes the middleware to continuously redirect to the signin…
Until now, i was using the type any to refer the children of my components, but when I updated my deploy it says not accept any as a valid type, what type i should use on my Section component bellow?…