diff --git a/src/frontend/src/hooks/useIsLocalConnection.ts b/src/frontend/src/customization/hooks/use-custom-is-local-connection.ts similarity index 91% rename from src/frontend/src/hooks/useIsLocalConnection.ts rename to src/frontend/src/customization/hooks/use-custom-is-local-connection.ts index cbbc63194..e42753d06 100644 --- a/src/frontend/src/hooks/useIsLocalConnection.ts +++ b/src/frontend/src/customization/hooks/use-custom-is-local-connection.ts @@ -4,7 +4,7 @@ import { useMemo } from "react"; * Hook to check if the current window is being accessed through a local connection * @returns A boolean indicating if the current connection is local */ -export function useIsLocalConnection(): boolean { +export function useCustomIsLocalConnection(): boolean { return useMemo(() => { // Get the current window's hostname const currentHostname = window.location.hostname; diff --git a/src/frontend/src/pages/MainPage/pages/homePage/components/McpServerTab.tsx b/src/frontend/src/pages/MainPage/pages/homePage/components/McpServerTab.tsx index 27adc7701..4d136b6d9 100644 --- a/src/frontend/src/pages/MainPage/pages/homePage/components/McpServerTab.tsx +++ b/src/frontend/src/pages/MainPage/pages/homePage/components/McpServerTab.tsx @@ -11,9 +11,9 @@ import { } from "@/controllers/API/queries/mcp"; import { useGetInstalledMCP } from "@/controllers/API/queries/mcp/use-get-installed-mcp"; import { usePatchInstallMCP } from "@/controllers/API/queries/mcp/use-patch-install-mcp"; +import { useCustomIsLocalConnection } from "@/customization/hooks/use-custom-is-local-connection"; import useTheme from "@/customization/hooks/use-custom-theme"; import { customGetMCPUrl } from "@/customization/utils/custom-mcp-url"; -import { useIsLocalConnection } from "@/hooks/useIsLocalConnection"; import useAlertStore from "@/stores/alertStore"; import useAuthStore from "@/stores/authStore"; import { useFolderStore } from "@/stores/foldersStore"; @@ -150,7 +150,7 @@ const McpServerTab = ({ folderName }: { folderName: string }) => { const isAutoLogin = useAuthStore((state) => state.autoLogin); // Check if the current connection is local - const isLocalConnection = useIsLocalConnection(); + const isLocalConnection = useCustomIsLocalConnection(); const [selectedMode, setSelectedMode] = useState( isLocalConnection ? "Auto install" : "JSON",