|
1 | 1 | /* eslint-disable @next/next/no-img-element */ |
2 | 2 |
|
| 3 | +import AgentChat from "@/components/templates/agent/agentChat"; |
| 4 | +import { HeliconeAgentProvider } from "@/components/templates/agent/HeliconeAgentContext"; |
3 | 5 | import { ErrorBoundary } from "@/components/ui/error-boundary"; |
| 6 | +import { |
| 7 | + ResizableHandle, |
| 8 | + ResizablePanel, |
| 9 | + ResizablePanelGroup, |
| 10 | +} from "@/components/ui/resizable"; |
4 | 11 | import { $JAWN_API } from "@/lib/clients/jawn"; |
| 12 | +import { logger } from "@/lib/telemetry/logger"; |
| 13 | +import { useHeliconeAuthClient } from "@/packages/common/auth/client/AuthClientFactory"; |
5 | 14 | import { Rocket } from "lucide-react"; |
6 | 15 | import { useRouter } from "next/router"; |
7 | | -import { useMemo, useRef, useState, useEffect } from "react"; |
| 16 | +import { useEffect, useMemo, useRef, useState } from "react"; |
8 | 17 | import { useChangelog } from "../../../services/hooks/admin"; |
9 | 18 | import UpgradeProModal from "../../shared/upgradeProModal"; |
10 | 19 | import { Row } from "../common"; |
11 | | -import { logger } from "@/lib/telemetry/logger"; |
12 | 20 | import { useOrg } from "../org/organizationContext"; |
13 | 21 | import MetaData from "../public/authMetaData"; |
14 | 22 | import DemoModal from "./DemoModal"; |
15 | 23 | import MainContent, { BannerType } from "./MainContent"; |
16 | 24 | import Sidebar from "./Sidebar"; |
17 | | -import { useHeliconeAuthClient } from "@/packages/common/auth/client/AuthClientFactory"; |
18 | | -import { HeliconeAgentProvider } from "@/components/templates/agent/HeliconeAgentContext"; |
19 | | -import { |
20 | | - ResizableHandle, |
21 | | - ResizablePanel, |
22 | | - ResizablePanelGroup, |
23 | | -} from "@/components/ui/resizable"; |
24 | | -import AgentChat from "@/components/templates/agent/agentChat"; |
25 | 25 |
|
26 | 26 | interface AuthLayoutProps { |
27 | 27 | children: React.ReactNode; |
@@ -92,24 +92,6 @@ const AuthLayout = (props: AuthLayoutProps) => { |
92 | 92 | ); |
93 | 93 | const orgContext = useOrg(); |
94 | 94 |
|
95 | | - useEffect(() => { |
96 | | - // Allow access to certain pages during onboarding (like quickstart and settings for setup) |
97 | | - const allowedPagesDuringOnboarding = [ |
98 | | - "/quickstart", |
99 | | - "/settings/providers", |
100 | | - "/settings/billing", |
101 | | - "/credits", |
102 | | - ]; |
103 | | - |
104 | | - const isOnAllowedPage = allowedPagesDuringOnboarding.some((path) => |
105 | | - pathname.startsWith(path), |
106 | | - ); |
107 | | - |
108 | | - if (orgContext?.currentOrg?.has_onboarded === false && !isOnAllowedPage) { |
109 | | - router.push("/quickstart"); |
110 | | - } |
111 | | - }, [orgContext?.currentOrg?.has_onboarded, pathname, router]); |
112 | | - |
113 | 95 | const banner = useMemo((): BannerType | null => { |
114 | 96 | const activeBanner = alertBanners?.data?.find((x) => x.active); |
115 | 97 | if (activeBanner) { |
|
0 commit comments