mv `ONBOARDING_INTRODUCED_AT` to new file (#557)

otherwise will the `/event-types`-route probably unnecessarily import the whole `getting_started`-page
pull/534/head^2
Alex Johansson 2021-09-02 18:36:58 +02:00 committed by GitHub
parent 72c43cc44e
commit 8eaa94d3c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

3
lib/getting-started.tsx Normal file
View File

@ -0,0 +1,3 @@
import dayjs from "dayjs";
export const ONBOARDING_INTRODUCED_AT = dayjs("September 1 2021").toISOString();

View File

@ -24,7 +24,7 @@ import prisma from "@lib/prisma";
import { GetServerSidePropsContext, InferGetServerSidePropsType } from "next";
import { useMutation } from "react-query";
import createEventType from "@lib/mutations/event-types/create-event-type";
import { ONBOARDING_INTRODUCED_AT } from "../getting-started";
import { ONBOARDING_INTRODUCED_AT } from "@lib/getting-started";
const EventTypesPage = (props: InferGetServerSidePropsType<typeof getServerSideProps>) => {
const { user, types } = props;

View File

@ -50,8 +50,6 @@ const DEFAULT_EVENT_TYPES = [
},
];
export const ONBOARDING_INTRODUCED_AT = dayjs("September 1 2021").toISOString();
type OnboardingProps = {
user: User;
integrations?: Record<string, string>[];