From c2aa536660f0976f0ca95d2410316c8ac1ec9531 Mon Sep 17 00:00:00 2001 From: developer1054 Date: Tue, 28 Oct 2025 11:34:25 -0300 Subject: [PATCH] fix redir --- src/App.tsx | 2 +- src/pages/Index.tsx | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index 3603675..bfe5e7b 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -25,7 +25,7 @@ const App = () => ( element={} /> - : } /> + } /> {/* ADD ALL CUSTOM ROUTES ABOVE THE CATCH-ALL "*" ROUTE */} } /> } /> diff --git a/src/pages/Index.tsx b/src/pages/Index.tsx index 66118b4..913c999 100644 --- a/src/pages/Index.tsx +++ b/src/pages/Index.tsx @@ -8,6 +8,8 @@ import { BotView } from "@/components/bots/BotView"; import { BotChat } from "@/components/bots/BotChat"; import { AgentView } from "@/components/agent/AgentView"; import { Navigate, Route, Routes } from "react-router-dom"; +import React from "react"; +import { GlobalFunctions } from "@/GlobalFunctions"; interface Bot { id: string; @@ -28,6 +30,10 @@ const Index = () => { setActiveBotChat(null); }; + React.useEffect(() => { + if(!GlobalFunctions.isUsuarioLogado())window.location.replace(import.meta.env.VITE_BASE_URL_HGTX_CORE); + },[]); + return ( } />