-
-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clients/organisation: navigate to last visited organisation #4633
clients/organisation: navigate to last visited organisation #4633
Conversation
@magarpratik is attempting to deploy a commit to the polar-sh Team on Vercel. A member of the Team first needs to authorize it. |
Thank you for this @magarpratik 👍 That's interesting, but I would have liked a server-side approach. Basically, the logic is handled on the following route: polar/clients/apps/web/src/app/(main)/start/page.tsx Lines 14 to 23 in 07a4c0a
Ideally, this would check for the existence of a cookie (instead of local storage) to directly redirect to the last organization at that point. This cookie could be then be set client-side on the polar/clients/apps/web/src/components/Layout/DashboardLayout.tsx Lines 91 to 120 in ca27097
What do you think? :) |
Hi @frankie567, Thank you for the feedback. 🙌 It makes sense and it would probably be a bit more efficient too. I'll give it a go. 🫡 |
This reverts commit 4e653a1.
Hi @frankie567, I've implemented your feedback. PR is ready for re-review. 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Just need to bump that cookie expiration and we'll be good to go!
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Closes #4619
This PR add functionality to remember last visited organization.
When an authenticated user visits the default home page, they will be redirected to the last visited organization's dashboard.
remember_last_visited_org.mov