Category "next.js"

How can I connect IPFS with infura when uploading data?

I'm creating an NFT marketplace using hardhat, solidity & Next js, I have a form from where I enter some specific information about the NFT, then by clickin

Testing a Next.js app with a custom /pages/_app.js in React-Testing-Library

I'm attempting to follow this guide in Reat-Testing-Library documentation to wrap all the components I want to test. I'm doing this because I need access to the

Next JS deployed in Vercel, bug backgroundImage property with external URL file

I have in my Next.js project a card component with a backgroundImage from my Strapi API. The image is shown in local but when I deploy my project in Vercel it d

i18next: Map an array of objects in TypeScript

I am rewriting a React project to TypeScript. Packages: Next.js, next-i18next, styled-components EDIT: The answer is outdated as of current next-i18next version

How to add Font Awesome to Next.js project

I'm trying to add font-awesome to my Next.js project using webpack. I've tried following various instructions I've found on the web (using file-loader, url-load

How to trigger nextjs default 500 error page

I am unable to trigger the Next.js's 500 error page. Most resources talks about making a custom error page but the Next.js doc briefly mentions their default 50

How to get previous url in nextjs

How can I get the previous URL in nextjs? I thought the values this.props.router.asPath and nextProps.router.asPath are diffrent. Actually, I want to call route

How to make 301 redirect in NextJS Vercel project?

How can I make 301 re directions from one url to another in NextJS application that is stored on Vercel? I tried to add custom express server using server.js fi

Nextjs shallow routing for tabs?

Have a tabs component which work perfectly with the router.query state useEffect(() => { let found = false; if (currentTab !== 'leads') {

retrieving FormData as its original form

Today, while working on a project which uses below flow for creating new post in website [Client] ---> FormData --> [FrontEnd Server] ---> FormData --&

Type 'StaticImageData' is not assignable to type 'string'

I'm struggling with interfaces on my little learning NextJS and TypeScript project. I thought I had it sorted out but am dealing with an issue on my Header.tsx

Clear Radio buttons on Submit without getting errors

I want to clear the radio button values without getting errors of react in NextJS, i did manage to do in the other fields like in the example below... <div

PWA support in NextJs

we would like to build a fully offline capable react web application. We usually work with NextJS. The current problem that we are facing is that we are not abl

How do I change the background color of the container using onClick?

I am using Next.js. I have a set of colors in a different file. How do I change the background color randomly when clicking the button? The Color.js file export

Algolia - AutoComplete with Suggestion + Search Results Page - NextJS

Am implementing the Algolia search in my NextJS app. I have the datasource and indices already setup. What am trying to setup is something like what Gucci is do

Apollo Client empty context (sometimes?)

So I've run into this weird issue i cannot resolve. My client code was working fine until today. Without any updates to the packages or to the code related to a

WpGraphQL query returns null

I'm having this GraphQL query from headless Wordpress in Nexjs via WpGraphQl plugin: export const GET_POSTS_BY_CATEGORY_SLUG = gql` query GET_POSTS_BY_CATEGORY

how to get rid of CORS error with mailchimp API?

How to deal with CORS error with mailchimp API? or what is the problem with this code: This is using mailchimp package: import mailchimp from '@mailchimp/mailch

next.js iron-session req.session.user is undefined

I'm making a dashboard for my team's bot using next.js and iron-session. However, when I save the session and check it, req.session.user is undefined. How can I

How to reduce bundle size of first load page in Next.js? [duplicate]

I have a very big bundle size of one of my pages. How can I improve the first loading of the page in Next.js? Pls take a look on screenshot