taxonomy icon indicating copy to clipboard operation
taxonomy copied to clipboard

After login when going back again login screen is coming

Open shiv-2810 opened this issue 2 years ago • 2 comments

So, when we are login the site , 'https://tx.shadcn.com/dashboard', it opened with this url but when I am going again here "https://tx.shadcn.com" it is opening the homepage rather it should directly redirect to dashboard

shiv-2810 avatar Nov 09 '23 11:11 shiv-2810

Well, you can redirect logged in users from home page to dashboard.

go to (marketing/page.tsx):

import { getCurrentUser } from "@/lib/session"

const user = await getCurrentUser()
  if (user) {
    redirect('/dashboard')
  } 

malawllaqi avatar Nov 23 '23 06:11 malawllaqi

Hey I am working on this issue, will solve within an hour. Thankyou

TusharBhatt1 avatar Dec 02 '23 05:12 TusharBhatt1