File tree Expand file tree Collapse file tree
apps/web/app/(use-page-wrapper)/insights Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { getTranslate } from "app/_utils" ;
2+ import { notFound } from "next/navigation" ;
23
34import { CTA_CONTAINER_CLASS_NAME } from "@calcom/features/data-table/lib/utils" ;
5+ import { FeaturesRepository } from "@calcom/features/flags/features.repository" ;
46import Shell from "@calcom/features/shell/Shell" ;
57
68import UpgradeTipWrapper from "./UpgradeTipWrapper" ;
79
810export default async function InsightsLayout ( { children } : { children : React . ReactNode } ) {
11+ const featuresRepository = new FeaturesRepository ( ) ;
12+ const insightsEnabled = await featuresRepository . checkIfFeatureIsEnabledGlobally ( "insights" ) ;
13+
14+ if ( ! insightsEnabled ) {
15+ return notFound ( ) ;
16+ }
17+
918 const t = await getTranslate ( ) ;
19+
1020 return (
1121 < >
1222 < div >
Original file line number Diff line number Diff line change 11import { _generateMetadata } from "app/_utils" ;
2- import { notFound } from "next/navigation" ;
3-
4- import { FeaturesRepository } from "@calcom/features/flags/features.repository" ;
52
63import InsightsPage from "~/insights/insights-view" ;
74
@@ -15,12 +12,5 @@ export const generateMetadata = async () =>
1512 ) ;
1613
1714export default async function Page ( ) {
18- const featuresRepository = new FeaturesRepository ( ) ;
19- const insightsEnabled = await featuresRepository . checkIfFeatureIsEnabledGlobally ( "insights" ) ;
20-
21- if ( ! insightsEnabled ) {
22- return notFound ( ) ;
23- }
24-
2515 return < InsightsPage /> ;
2616}
Original file line number Diff line number Diff line change 11import { _generateMetadata } from "app/_utils" ;
2- import { notFound } from "next/navigation" ;
3-
4- import { FeaturesRepository } from "@calcom/features/flags/features.repository" ;
52
63import InsightsVirtualQueuesPage from "~/insights/insights-virtual-queues-view" ;
74
@@ -15,12 +12,5 @@ export const generateMetadata = async () =>
1512 ) ;
1613
1714export default async function Page ( ) {
18- const featuresRepository = new FeaturesRepository ( ) ;
19- const insightsEnabled = await featuresRepository . checkIfFeatureIsEnabledGlobally ( "insights" ) ;
20-
21- if ( ! insightsEnabled ) {
22- return notFound ( ) ;
23- }
24-
2515 return < InsightsVirtualQueuesPage /> ;
2616}
Original file line number Diff line number Diff line change 11import { _generateMetadata } from "app/_utils" ;
2- import { notFound } from "next/navigation" ;
3-
4- import { FeaturesRepository } from "@calcom/features/flags/features.repository" ;
52
63import InsightsRoutingPage from "~/insights/insights-routing-view" ;
74
@@ -15,12 +12,5 @@ export const generateMetadata = async () =>
1512 ) ;
1613
1714export default async function Page ( ) {
18- const featuresRepository = new FeaturesRepository ( ) ;
19- const insightsEnabled = await featuresRepository . checkIfFeatureIsEnabledGlobally ( "insights" ) ;
20-
21- if ( ! insightsEnabled ) {
22- return notFound ( ) ;
23- }
24-
2515 return < InsightsRoutingPage /> ;
2616}
You can’t perform that action at this time.
0 commit comments