avatar to main merge
I have completed the character creation screen on the avatar branch and am preparing to merge it into main.
This commit is contained in:
@@ -1,18 +1,12 @@
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
import {
|
||||
getSessionUser,
|
||||
hasCompletedOnboarding,
|
||||
} from "@/lib/auth-helpers";
|
||||
import { routes } from "@/lib/routes";
|
||||
import { getOnboardingRedirectPath, getSessionUser } from "@/lib/auth-helpers";
|
||||
|
||||
export async function LoggedInRedirect() {
|
||||
const user = await getSessionUser();
|
||||
|
||||
if (user) {
|
||||
redirect(
|
||||
hasCompletedOnboarding(user) ? routes.avatar : routes.onboardingQuiz,
|
||||
);
|
||||
redirect(await getOnboardingRedirectPath());
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user