mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-06 13:49:54 -06:00
chore: removed experience page (#4320)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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`,
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
import { ExperiencePage } from "@/modules/ee/insights/experience/page";
|
||||
|
||||
export default ExperiencePage;
|
||||
@@ -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`);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user