From c9cf9d830487d9aab3614d08ffaa0538b1a5cf40 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com> Date: Fri, 30 Aug 2024 18:51:05 -0300 Subject: [PATCH] refactor: update docs link to be modular (#3637) changed docs link to be modular --- src/frontend/src/components/headerComponent/index.tsx | 6 +++++- src/frontend/src/customization/config-constants.ts | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/frontend/src/components/headerComponent/index.tsx b/src/frontend/src/components/headerComponent/index.tsx index 2e741fa22..c92cc78ae 100644 --- a/src/frontend/src/components/headerComponent/index.tsx +++ b/src/frontend/src/components/headerComponent/index.tsx @@ -12,6 +12,7 @@ import { AuthContext } from "../../contexts/authContext"; import { useLogout } from "@/controllers/API/queries/auth"; import { CustomLink } from "@/customization/components/custom-link"; +import { DOCS_LINK } from "@/customization/config-constants"; import { ENABLE_DARK_MODE, ENABLE_PROFILE_ICONS, @@ -257,7 +258,10 @@ export default function Header(): JSX.Element { - window.open("https://docs.langflow.org/", "_blank") + window.open( + DOCS_LINK || "https://docs.langflow.org/", + "_blank", + ) } > diff --git a/src/frontend/src/customization/config-constants.ts b/src/frontend/src/customization/config-constants.ts index c8f401d00..2b1d12313 100644 --- a/src/frontend/src/customization/config-constants.ts +++ b/src/frontend/src/customization/config-constants.ts @@ -4,8 +4,10 @@ export const PROXY_TARGET = "http://127.0.0.1:7860"; export const API_ROUTES = ["^/api/v1/", "/health"]; export const BASE_URL_API = "/api/v1/"; export const HEALTH_CHECK_URL = "/health_check"; +export const DOCS_LINK = "https://docs.langflow.com"; export default { + DOCS_LINK, BASENAME, PORT, PROXY_TARGET,