fix: initialized flags on event-types page#13469
Conversation
|
@SomayChauhan is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
|
Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link. |
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
|
can we also remove the feature flag for managed event types? its not needed anymore |
|
removed |
| @@ -0,0 +1,3 @@ | |||
| -- revert 20230404202721_add_feature_flag_managed_event_types | |||
|
|
|||
There was a problem hiding this comment.
Why are we deleting this feature flag?
There was a problem hiding this comment.
can we also remove the feature flag for managed event types? its not needed anymore
i thought @PeerRich meant its not need anymore, so removed it
otherwise the toggle is showing up in settings/admin/flags
There was a problem hiding this comment.
yes, i am ok removing this. this was used to roll it out slowly but now managed event types is a core part of our offering and doenst need a feature flag imo
| import type { GetServerSidePropsContext } from "next"; | ||
|
|
||
| import { getServerSession } from "@calcom/features/auth/lib/getServerSession"; | ||
|
|
||
| import { ssrInit } from "@server/lib/ssr"; | ||
|
|
||
| export const getServerSideProps = async (context: GetServerSidePropsContext) => { | ||
| const ssr = await ssrInit(context); | ||
| const session = await getServerSession({ req: context.req, res: context.res }); | ||
|
|
||
| if (!session) { | ||
| return { | ||
| redirect: { | ||
| redirect: { | ||
| permanent: false, | ||
| destination: "/auth/login", | ||
| }, | ||
| }, | ||
| }; | ||
| } | ||
|
|
||
| return { props: { trpcState: ssr.dehydrate() } }; | ||
| }; |
There was a problem hiding this comment.
do we even need this if we remove the feature flag for managed event types?
There was a problem hiding this comment.
i think we should still include this.
There was a problem hiding this comment.
ok.
btw. end to end tests failing, not sure if its related to this PR @keithwillcode ?
There was a problem hiding this comment.
It’s not unfortunately. We have E2E test suite issues at the moment. Hoping to resolve by tomorrow and will get this merged.
What does this PR do?
Fixes #13468
added it for event-types page only, fixes the isses in hand
Future consideration: Potentially enabling flags to be accessible on all pages consistently.