diff --git a/ui/app/workspace/config/proxy/page.tsx b/ui/app/workspace/config/proxy/page.tsx index de9d0f55a..b81467c76 100644 --- a/ui/app/workspace/config/proxy/page.tsx +++ b/ui/app/workspace/config/proxy/page.tsx @@ -1,18 +1,26 @@ -"use client" +"use client"; -import { IS_ENTERPRISE } from "@/lib/constants/config" -import { redirect } from "next/navigation" -import ProxyView from "../views/proxyView" +import { IS_ENTERPRISE } from "@/lib/constants/config"; +import { useRouter } from "next/navigation"; +import { useEffect } from "react"; +import ProxyView from "../views/proxyView"; export default function ProxyPage() { - if (!IS_ENTERPRISE) { - redirect("/workspace/config/client-settings") - } + const router = useRouter(); - return ( -
- -
- ) -} + useEffect(() => { + if (!IS_ENTERPRISE) { + router.replace("/workspace/config/client-settings"); + } + }, [router]); + + if (!IS_ENTERPRISE) { + return null; + } + return ( +
+ +
+ ); +}