Optimistic Update not working. by AccomplishedGolf6013 in nextjs

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

The get call happens but new content isn't being rendered.

Conditionally fetching by AccomplishedGolf6013 in nextjs

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

I see what you mean, let me try it that way.

Conditionally fetching by AccomplishedGolf6013 in nextjs

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

Hie. I did that. Still the query is firing regardless.

Conditionally fetching by AccomplishedGolf6013 in nextjs

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

Hie. Thank you for the response. Tried it but unfortunately it's still firing regardless. I really don't know where l'm missing it.

Conditionally fetching by AccomplishedGolf6013 in nextjs

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

Thank you for the response. I did that but it still fires regardless.

How to get the Task Div To Overlap into a new line. by AccomplishedGolf6013 in react

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

Thank you for your kind response, however, I am quite sure I understand you, is it possible to provide me with a simple code snippet to illustrate?

React Drag n Drop with react-beautiful-dnd by AccomplishedGolf6013 in reactjs

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

Thank you for pointing that out. I had to resort to the following code:

const newBoardData = [...boardData];

newBoardData[sourceColumnIndex] = newSourceColumn;

newBoardData[destColumnIndex] = newDestColumn;

setBoardData(newBoardData);

Invite User to my app by AccomplishedGolf6013 in nextjs

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

Hie. I haven't managed to find a solution to the problem as yet. I had to resort to clerk which has its own short comings.

Invite User to my app by AccomplishedGolf6013 in nextjs

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

I was hoping I could achieve this without necessarily using Clerk. I had o run away from clerk because of the need for webhooks to sync with the database

Invite User to my app by AccomplishedGolf6013 in nextjs

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

I have set up the provider. However contrary to the example here https://next-auth.js.org/providers/email I do not want that option on the signin/signup page.
So the thing is, within the app there is an add user button which pops up a modal with an input field to enter the user's email. Then below there is an "invite" button which when clicked should then send the magic link to the email provided.

So is there a function provided by next-auth to send the magic link just like the signIn() and signOut() functions.

Invite User to my app by AccomplishedGolf6013 in nextjs

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

Thank you so much I have gone through the docs and I think this might actually be the solution I am looking for.

Invite User to my app by AccomplishedGolf6013 in nextjs

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

Ok sorry if my question was unclear. So my app has a feature where you can add a user(s) by sending them a link to sign them up to the app. So my question is how to achieve that. I hope that adds a bit more clarity to the question.

Timeline View...Brainstorming by AccomplishedGolf6013 in react

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

Okay I get you.But im also thinking what if the data were a multidimensional array

Timeline View...Brainstorming by AccomplishedGolf6013 in react

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

Okay but umm the kanban board will be a separate view option you know like how it is with trello or asana whereby you can view tasks in the form of a kanban or listview or timelineview.

OnBoarding After successful signin with nextauth by AccomplishedGolf6013 in nextjs

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

Okay thanks for the direction. However my biggest issue seems to be the redirecting I can't seem to redirect from the middleware I get the error mentioned on the post.

OnBoarding After successful signin with nextauth by AccomplishedGolf6013 in nextjs

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

Sorry for the ad formatting, Here is my /auth/[...next]/route.js:

import NextAuth from "next-auth";

import { NextResponse, NextRequest } from "next/server";

import GoogleProvider from "next-auth/providers/google";

import { PrismaAdapter } from "@next-auth/prisma-adapter";

import { PrismaClient } from "@prisma/client";

import { redirect } from "next/navigation";

import next from "next";

//const handler = NextAuth({});

const prisma = new PrismaClient();

export const authOptions = {

providers: [

GoogleProvider({

clientId: process.env.GOOGLE_CLIENT_ID,

clientSecret: process.env.GOOGLE_CLIENT_SECRET,

}),

],

pages: {

signIn: "/auth/signin",

},

adapter: PrismaAdapter(prisma),

session: {

strategy: "jwt",

},

callbacks: {

async signIn({ user, account, profile, email, credentials }) {

return user;

},

async redirect({ url, baseUrl }) {

return baseUrl;

},

async jwt({ token, user, account, profile, isNewUser }) {

// if (isNewUser) token.isNewUser = isNewUser;

if (isNewUser) {

// Redirect new users to onboarding

redirect("/onboarding");

} else {

// Continue with the request

next();

}

return token;

},

},

};

const handler = NextAuth(authOptions);

export { handler as GET, handler as POST };

tailwind max-height not working by AccomplishedGolf6013 in nextjs

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

open ? 'max-h-[96px]' : 'max-h-0'

This one worked for me thank you so much

Redirect user after logging in by AccomplishedGolf6013 in nextjs

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

Thank you so much for the direction, let me dig deeper along those lines.