chore: removed experience page (#4320)

This commit is contained in:
Piyush Gupta
2024-11-20 12:53:37 +05:30
committed by GitHub
parent 6f041bf693
commit 0a5c98aba0
4 changed files with 0 additions and 24 deletions

View File

@@ -1,6 +1,5 @@
import { MainNavigation } from "@/app/(app)/environments/[environmentId]/components/MainNavigation";
import { TopControlBar } from "@/app/(app)/environments/[environmentId]/components/TopControlBar";
import { getIsAIEnabled } from "@/app/lib/utils";
import { getEnterpriseLicense } from "@/modules/ee/license-check/lib/utils";
import { getProductPermissionByUserId } from "@/modules/ee/teams/lib/roles";
import type { Session } from "next-auth";
@@ -81,8 +80,6 @@ export const EnvironmentLayout = async ({ environmentId, session, children }: En
]);
}
const isAIEnabled = await getIsAIEnabled(organization);
return (
<div className="flex h-screen min-h-screen flex-col overflow-hidden">
<DevEnvironmentBanner environment={environment} />
@@ -113,7 +110,6 @@ export const EnvironmentLayout = async ({ environmentId, session, children }: En
isFormbricksCloud={IS_FORMBRICKS_CLOUD}
membershipRole={membershipRole}
isMultiOrgEnabled={isMultiOrgEnabled}
isAIEnabled={isAIEnabled}
/>
<div id="mainContent" className="flex-1 overflow-y-auto bg-slate-50">
<TopControlBar

View File

@@ -12,7 +12,6 @@ import {
ChevronRightIcon,
Cog,
CreditCardIcon,
GaugeIcon,
GlobeIcon,
GlobeLockIcon,
KeyIcon,
@@ -69,7 +68,6 @@ interface NavigationProps {
isMultiOrgEnabled: boolean;
isFormbricksCloud?: boolean;
membershipRole?: TOrganizationRole;
isAIEnabled?: boolean;
}
export const MainNavigation = ({
@@ -81,7 +79,6 @@ export const MainNavigation = ({
isMultiOrgEnabled,
isFormbricksCloud = true,
membershipRole,
isAIEnabled = false,
}: NavigationProps) => {
const router = useRouter();
const pathname = usePathname();
@@ -163,13 +160,6 @@ export const MainNavigation = ({
const mainNavigation = useMemo(
() => [
{
name: t("common.experience"),
href: `/environments/${environment.id}/experience`,
icon: GaugeIcon,
isActive: pathname?.includes("/experience"),
isHidden: !isAIEnabled,
},
{
name: t("common.surveys"),
href: `/environments/${environment.id}/surveys`,

View File

@@ -1,3 +0,0 @@
import { ExperiencePage } from "@/modules/ee/insights/experience/page";
export default ExperiencePage;

View File

@@ -1,4 +1,3 @@
import { getIsAIEnabled } from "@/app/lib/utils";
import { getServerSession } from "next-auth";
import { getTranslations } from "next-intl/server";
import { redirect } from "next/navigation";
@@ -28,12 +27,6 @@ const Page = async (props) => {
return redirect(`/environments/${params.environmentId}/settings/billing`);
}
const isAIEnabled = await getIsAIEnabled(organization);
if (isAIEnabled) {
return redirect(`/environments/${params.environmentId}/experience`);
}
return redirect(`/environments/${params.environmentId}/surveys`);
};