shadcn-ui/taxonomy

After login when going back again login screen is coming

shiv-2810 opened this issue · 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

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')
  } 

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