17 lines
490 B
TypeScript
17 lines
490 B
TypeScript
import { User } from "@prisma/client";
|
|
|
|
import dayjs from "@calcom/dayjs";
|
|
|
|
export const ONBOARDING_INTRODUCED_AT = dayjs("September 1 2021").toISOString();
|
|
|
|
export const ONBOARDING_NEXT_REDIRECT = {
|
|
redirect: {
|
|
permanent: false,
|
|
destination: "/getting-started",
|
|
},
|
|
} as const;
|
|
|
|
export const shouldShowOnboarding = (user: Pick<User, "createdDate" | "completedOnboarding">) => {
|
|
return !user.completedOnboarding && dayjs(user.createdDate).isAfter(ONBOARDING_INTRODUCED_AT);
|
|
};
|