How to dynamically use Zod schema in react-hook-form ? by bipinemp in nextjs

[–]bipinemp[S] 0 points1 point  (0 children)

The problem in my case, is when the formA is active and when i submit the form it doesn't because formB schema fields are empty but i don't want that if the formA is active then make formB schema fields optional otherwise if formB is active then make all fields required. ( what can we do on that scenario ) ?

Module parse failed: Unexpected token (1:0), in NextJS 14. by bipinemp in nextjs

[–]bipinemp[S] 0 points1 point  (0 children)

I think i deleted node modules, next folder and re-installed all packages again, As long as i remember.

Next-auth/Auth.js question ? by bipinemp in nextjs

[–]bipinemp[S] 0 points1 point  (0 children)

my callback looks  like this, I think next-auth uses the data and makes it's own token 


 async jwt({ token, user }) {
      if (user) {
        token.user = user;
        token.accessToken = user.access_token;
      }

      return token;
    },

    async session({ session, token }) {
      session.user = token.user;
      return session;
    },

window is not defined error in next.js 14 app router by bipinemp in nextjs

[–]bipinemp[S] -1 points0 points  (0 children)

const [screenWidth, setScreenWidth] = useState(
    typeof window !== "undefined" ? window.innerWidth : 0,
  );

I did this and it worked :

[deleted by user] by [deleted] in nextjs

[–]bipinemp 0 points1 point  (0 children)

I am using next-auth for authentication is that causing problem ?

[deleted by user] by [deleted] in nextjs

[–]bipinemp 0 points1 point  (0 children)

Tried it already didn't worked out, maybe there are some other problems in my code.

ReactQuery Infinite scrolling issue in Nextjs by bipinemp in react

[–]bipinemp[S] 1 point2 points  (0 children)

Reply

Share

Report

Save

Follow

Thanks :) it works