fix(onboarding): preserve restored board login target
This commit is contained in:
1 parent
174e0a7606
commit
fc66211dd2
2 files changed
+10
-2
No files matched your search
@@ -52,7 +52,13 @@ export const createBoardContentPage = <TParams extends Record<string, unknown>>(
|
||||
if (error instanceof TRPCError && error.code === "NOT_FOUND") {
|
||||
if (!session) {
|
||||
logger.debug("No home board found for anonymous user, redirecting to login");
|
||||
redirect("/auth/login");
|
||||
const requestedBoardName =
|
||||
typeof resolvedParams.name === "string" ? `/boards/${encodeURIComponent(resolvedParams.name)}` : null;
|
||||
redirect(
|
||||
requestedBoardName
|
||||
? `/auth/login?callbackUrl=${encodeURIComponent(requestedBoardName)}`
|
||||
: "/auth/login",
|
||||
);
|
||||
}
|
||||
|
||||
notFound();
|
||||
|
||||
Reference in new issue
Block a user