feat: add assessment, privacy and support flows
This commit is contained in:
1 parent
ee3738ee73
commit
e4f24fa202
339 files changed
+56454
-1126
No files matched your search
@@ -0,0 +1,22 @@
|
||||
import { getOnboardingDestination } from "../../../entities/session";
|
||||
import type { Account } from "../../../shared/api/schemas";
|
||||
import { paths } from "../../../shared/config";
|
||||
|
||||
/** Only a fixed support intent can override the saved onboarding step. */
|
||||
export function getSignInDestination(
|
||||
account: Pick<Account, "scenario" | "onboarding_step">,
|
||||
state: unknown,
|
||||
): string {
|
||||
if (
|
||||
typeof state === "object" &&
|
||||
state !== null &&
|
||||
!Array.isArray(state) &&
|
||||
"returnTo" in state &&
|
||||
state.returnTo === "support"
|
||||
) {
|
||||
return account.scenario === "candidate"
|
||||
? paths.candidate.supportCases
|
||||
: paths.employer.supportCases;
|
||||
}
|
||||
return getOnboardingDestination(account);
|
||||
}
|
||||
Reference in new issue
Block a user